Bug 1474878 - fix compile errors found by clang-cl in Windows-only code. r=aceman
This commit is contained in:
Родитель
9cae8769fb
Коммит
03b5a08db3
|
@ -60,7 +60,7 @@ NS_IMETHODIMP nsAbOutlookDirectory::Init(const char *aUri)
|
|||
|
||||
mAbWinType = getAbWinType(kOutlookDirectoryScheme, mURINoQuery.get(), stub, entry);
|
||||
if (mAbWinType == nsAbWinType_Unknown) {
|
||||
PRINTF(("Huge problem URI=%s.\n", mURINoQuery));
|
||||
PRINTF(("Huge problem URI=%s.\n", mURINoQuery.get()));
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
nsAbWinHelperGuard mapiAddBook (mAbWinType);
|
||||
|
|
|
@ -286,7 +286,7 @@ nsMessengerWinIntegration::ResetCurrent()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NOTIFYICONDATAW sBiffIconData = { NOTIFYICONDATAW_V2_SIZE,
|
||||
NOTIFYICONDATAW sBiffIconData = { (DWORD)NOTIFYICONDATAW_V2_SIZE,
|
||||
0,
|
||||
2,
|
||||
NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_INFO,
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
enum Type {ltGroupBegin, ltGroupEnd, ltKeyword, ltPCDATA_A, ltPCDATA_W,
|
||||
ltBDATA, ltEOF, ltError};
|
||||
Lexem(Type t=ltError) : m_type(t) {}
|
||||
Lexem(Lexem& from) // Move pointers when copying
|
||||
Lexem(Lexem& from)
|
||||
{
|
||||
switch (m_type = from.m_type) {
|
||||
case ltKeyword:
|
||||
|
@ -159,8 +159,8 @@ public:
|
|||
m_pcdata_w = from.m_pcdata_w;
|
||||
break;
|
||||
case ltBDATA:
|
||||
m_bdata = from.m_bdata;
|
||||
from.m_type = ltError;
|
||||
m_bdata = from.m_bdata; // Move pointers when copying.
|
||||
from.m_type = ltError; // Invalidate the original. Not nice.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -180,8 +180,8 @@ public:
|
|||
m_pcdata_w = from.m_pcdata_w;
|
||||
break;
|
||||
case ltBDATA:
|
||||
m_bdata = from.m_bdata;
|
||||
from.m_type = ltError;
|
||||
m_bdata = from.m_bdata; // Move pointers when copying.
|
||||
from.m_type = ltError; // Invalidate the original. Not nice.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -314,9 +314,8 @@ Keyword GetKeyword(std::istream& stream)
|
|||
return keyword;
|
||||
}
|
||||
|
||||
Lexem GetLexem(std::istream& stream)
|
||||
void GetLexem(std::istream& stream, Lexem& result)
|
||||
{
|
||||
Lexem result;
|
||||
// We always stay at the beginning of the next lexem or a crlf
|
||||
// If it's a brace then it's group begin/end
|
||||
// If it's a backslash -> Preprocess
|
||||
|
@ -347,7 +346,6 @@ Lexem GetLexem(std::istream& stream)
|
|||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PreprocessLexem(/*inout*/Lexem& lexem, std::istream& stream, int uc)
|
||||
|
@ -464,11 +462,12 @@ void UpdateState(const Lexem& lexem, /*inout*/GlobalState& globalState)
|
|||
void DecodeRTF(std::istream& rtf, CRTFDecoder& decoder)
|
||||
{
|
||||
// Check if this is the rtf
|
||||
Lexem lexem = GetLexem(rtf);
|
||||
Lexem lexem;
|
||||
GetLexem(rtf, lexem);
|
||||
if (lexem.type() != Lexem::ltGroupBegin)
|
||||
return;
|
||||
decoder.BeginGroup();
|
||||
lexem = GetLexem(rtf);
|
||||
GetLexem(rtf, lexem);
|
||||
if ((lexem.type() != Lexem::ltKeyword) || !eq(lexem.KeywordName(), "rtf") ||
|
||||
!lexem.KeywordVal() || (*lexem.KeywordVal() != 1))
|
||||
return;
|
||||
|
@ -478,7 +477,7 @@ void DecodeRTF(std::istream& rtf, CRTFDecoder& decoder)
|
|||
// Level is the count of elements in the stack
|
||||
|
||||
while (!state.stream.eof() && (state.stack.size()>0)) { // Don't go past the global group
|
||||
lexem = GetLexem(state.stream);
|
||||
GetLexem(state.stream, lexem);
|
||||
PreprocessLexem(lexem, state.stream, state.stack.top().uc);
|
||||
UpdateState(lexem, state);
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ void WMSettings::SetSmtpServer(nsIDocument *xmlDoc, nsIMsgIdentity *id,
|
|||
extgServer->GetKey(getter_Copies(smtpServerKey));
|
||||
id->SetSmtpServerKey(smtpServerKey);
|
||||
|
||||
IMPORT_LOG1("SMTP server already exists: %S\n", smtpName);
|
||||
IMPORT_LOG1("SMTP server already exists: %s\n", NS_ConvertUTF16toUTF8(smtpName).get());
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISmtpServer> smtpServer;
|
||||
|
@ -734,7 +734,7 @@ void WMSettings::SetSmtpServer(nsIDocument *xmlDoc, nsIMsgIdentity *id,
|
|||
smtpServer->GetKey(getter_Copies(smtpServerKey));
|
||||
id->SetSmtpServerKey(smtpServerKey);
|
||||
|
||||
IMPORT_LOG1("Created new SMTP server: %S\n", smtpName);
|
||||
IMPORT_LOG1("Created new SMTP server: %s\n", NS_ConvertUTF16toUTF8(smtpName).get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче