mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1394013 Fix forbidden string constant assignment r=froydnj
ISO C++ forbids converting a string constant to 'wchar_t*' [-Werror=write-strings] Either change it to a nullptr (which has same intent) or pass through a static MozReview-Commit-ID: CSunOCyO9PN --HG-- extra : rebase_source : bfdabc1f463eca75987c6561f7c3ea60acf0340f
This commit is contained in:
parent
ef58a48ce4
commit
6fd392825a
2
uriloader/exthandler/win/nsMIMEInfoWin.cpp
Normal file → Executable file
2
uriloader/exthandler/win/nsMIMEInfoWin.cpp
Normal file → Executable file
@ -419,7 +419,7 @@ bool nsMIMEInfoWin::GetDllLaunchInfo(nsIFile * aDll,
|
||||
// Replace embedded environment variables.
|
||||
uint32_t bufLength =
|
||||
::ExpandEnvironmentStringsW(appFilesystemCommand.get(),
|
||||
L"", 0);
|
||||
nullptr, 0);
|
||||
if (bufLength == 0) // Error
|
||||
return false;
|
||||
|
||||
|
4
xpcom/base/nsVersionComparator.cpp
Normal file → Executable file
4
xpcom/base/nsVersionComparator.cpp
Normal file → Executable file
@ -138,8 +138,10 @@ ParseVP(wchar_t* aPart, VersionPartW& aResult)
|
||||
}
|
||||
|
||||
if (aPart[0] == '*' && aPart[1] == '\0') {
|
||||
static wchar_t kEmpty[] = L"";
|
||||
|
||||
aResult.numA = INT32_MAX;
|
||||
aResult.strB = L"";
|
||||
aResult.strB = kEmpty;
|
||||
} else {
|
||||
aResult.numA = wcstol(aPart, const_cast<wchar_t**>(&aResult.strB), 10);
|
||||
}
|
||||
|
@ -1269,7 +1269,7 @@ nsLocalFile::CleanupCmdHandlerPath(nsAString& aCommandHandler)
|
||||
|
||||
// Expand environment variables so we have full path strings.
|
||||
uint32_t bufLength = ::ExpandEnvironmentStringsW(handlerCommand.get(),
|
||||
L"", 0);
|
||||
nullptr, 0);
|
||||
if (bufLength == 0) // Error
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user