diff --git a/browser/components/shell/nsWindowsShellService.cpp b/browser/components/shell/nsWindowsShellService.cpp index e3c4aa5bcb6b..1f4bcf1dc1db 100644 --- a/browser/components/shell/nsWindowsShellService.cpp +++ b/browser/components/shell/nsWindowsShellService.cpp @@ -805,7 +805,7 @@ static nsresult CreateShortcutImpl( // TODO: Properly escape quotes in the string, see bug 1604287. nsString arguments; for (auto& arg : aArguments) { - arguments.AppendPrintf("\"%S\" ", arg.get()); + arguments.AppendPrintf("\"%S\" ", static_cast(arg.get())); } link->SetArguments(arguments.get()); diff --git a/extensions/auth/nsAuthSSPI.cpp b/extensions/auth/nsAuthSSPI.cpp index ffc500a994bb..3c051d34bfdb 100644 --- a/extensions/auth/nsAuthSSPI.cpp +++ b/extensions/auth/nsAuthSSPI.cpp @@ -221,7 +221,7 @@ nsAuthSSPI::Init(const nsACString& aServiceName, uint32_t aServiceFlags, PSecPkgInfoW pinfo; rc = (sspi->QuerySecurityPackageInfoW)(package, &pinfo); if (rc != SEC_E_OK) { - LOG(("%s package not found\n", package)); + LOG(("%S package not found\n", package)); return NS_ERROR_UNEXPECTED; } mMaxTokenLen = pinfo->cbMaxToken; diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp index b2b076c01c1e..89353386e0ec 100644 --- a/security/manager/ssl/nsNSSComponent.cpp +++ b/security/manager/ssl/nsNSSComponent.cpp @@ -469,7 +469,8 @@ static nsresult AccountHasFamilySafetyEnabled(bool& enabled) { MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("couldn't get sid")); return NS_ERROR_FAILURE; } - MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("our sid is '%S'", sid.get())); + MOZ_LOG(gPIPNSSLog, LogLevel::Debug, + ("our sid is '%S'", static_cast(sid.get()))); bool hasSid; rv = usersKey->HasChild(sid, &hasSid); if (NS_FAILED(rv)) { diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp index 0e08b7ca22a1..c62f1a7f13c9 100644 --- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp +++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp @@ -406,7 +406,7 @@ static void AddCachedDirRule(sandbox::TargetPolicy* aPolicy, // This can only be an NS_WARNING, because it can null for xpcshell tests. NS_WARNING("Tried to add rule with null base dir."); LOG_E("Tried to add rule with null base dir. Relative path: %S, Access: %d", - aRelativePath.get(), aAccess); + static_cast(aRelativePath.get()), aAccess); return; } @@ -418,7 +418,7 @@ static void AddCachedDirRule(sandbox::TargetPolicy* aPolicy, if (sandbox::SBOX_ALL_OK != result) { NS_ERROR("Failed to add file policy rule."); LOG_E("Failed (ResultCode %d) to add %d access to: %S", result, aAccess, - rulePath.get()); + static_cast(rulePath.get())); } } diff --git a/toolkit/components/remote/RemoteUtils.h b/toolkit/components/remote/RemoteUtils.h index e8ff64a39df5..9f3557102f3c 100644 --- a/toolkit/components/remote/RemoteUtils.h +++ b/toolkit/components/remote/RemoteUtils.h @@ -18,7 +18,7 @@ static void BuildClassName(const char* aProgram, const char* aProfile, # if defined XP_WIN nsString pfn = mozilla::widget::WinUtils::GetPackageFamilyName(); if (!pfn.IsEmpty()) { - aClassName.AppendPrintf("_%s", pfn.get()); + aClassName.AppendPrintf("_%S", static_cast(pfn.get())); } # endif aClassName.AppendPrintf("_%s_RemoteWindow", aProfile); diff --git a/uriloader/exthandler/win/nsOSHelperAppService.cpp b/uriloader/exthandler/win/nsOSHelperAppService.cpp index ef9b6340099e..f93d87658004 100644 --- a/uriloader/exthandler/win/nsOSHelperAppService.cpp +++ b/uriloader/exthandler/win/nsOSHelperAppService.cpp @@ -444,8 +444,8 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, bool haveMeaningfulMimeType = !aMIMEType.IsEmpty() && !aMIMEType.LowerCaseEqualsLiteral(APPLICATION_OCTET_STREAM); - LOG(("Extension lookup on '%s' with mimetype '%s'%s\n", fileExtension.get(), - flatType.get(), + LOG(("Extension lookup on '%S' with mimetype '%s'%s\n", + static_cast(fileExtension.get()), flatType.get(), haveMeaningfulMimeType ? " (treated as meaningful)" : "")); RefPtr mi; @@ -477,14 +477,14 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, !typeFromExtEquals(fileExtension.get(), flatType.get()))) { usedMimeTypeExtensionForLookup = true; fileExtension = extensionFromMimeType; - LOG(("Now using '%s' mimetype's default file extension '%s' for lookup\n", - flatType.get(), fileExtension.get())); + LOG(("Now using '%s' mimetype's default file extension '%S' for lookup\n", + flatType.get(), static_cast(fileExtension.get()))); } // If we have an extension, use it for lookup: mi = GetByExtension(fileExtension, flatType.get()); - LOG(("Extension lookup on '%s' found: 0x%p\n", fileExtension.get(), - mi.get())); + LOG(("Extension lookup on '%S' found: 0x%p\n", + static_cast(fileExtension.get()), mi.get())); if (mi) { bool hasDefault = false; @@ -494,8 +494,9 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, if (!hasDefault && !usedMimeTypeExtensionForLookup) { RefPtr miFromMimeType = GetByExtension(extensionFromMimeType, flatType.get()); - LOG(("Mime-based ext. lookup for '%s' found 0x%p\n", - extensionFromMimeType.get(), miFromMimeType.get())); + LOG(("Mime-based ext. lookup for '%S' found 0x%p\n", + static_cast(extensionFromMimeType.get()), + miFromMimeType.get())); if (miFromMimeType) { nsAutoString desc; miFromMimeType->GetDefaultDescription(desc); @@ -510,8 +511,8 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, // different: if (!extensionFromMimeType.IsEmpty() && !usedMimeTypeExtensionForLookup) { mi = GetByExtension(extensionFromMimeType, flatType.get()); - LOG(("Mime-based ext. lookup for '%s' found 0x%p\n", - extensionFromMimeType.get(), mi.get())); + LOG(("Mime-based ext. lookup for '%S' found 0x%p\n", + static_cast(extensionFromMimeType.get()), mi.get())); } if (mi) { mi.forget(aMIMEInfo); diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index b17c1e21c040..ddbae100c62e 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -124,7 +124,8 @@ GfxInfo::GetCleartypeParameters(nsAString& aCleartypeParams) { ClearTypeParameterInfo& params = clearTypeParams[d]; if (displayNames) { - outStr.AppendPrintf("%S [ ", params.displayName.get()); + outStr.AppendPrintf( + "%S [ ", static_cast(params.displayName.get())); } if (params.gamma >= 0) { @@ -137,8 +138,8 @@ GfxInfo::GetCleartypeParameters(nsAString& aCleartypeParams) { if (params.pixelStructure == PIXEL_STRUCT_RGB || params.pixelStructure == PIXEL_STRUCT_BGR) { outStr.AppendPrintf( - "Pixel Structure: %S ", - (params.pixelStructure == PIXEL_STRUCT_RGB ? u"RGB" : u"BGR")); + "Pixel Structure: %s ", + (params.pixelStructure == PIXEL_STRUCT_RGB ? "RGB" : "BGR")); } else { outStr.AppendPrintf("Pixel Structure: %d ", params.pixelStructure); }