зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1197324 - Fix new warnings. r=froydnj
This commit is contained in:
Родитель
42824df666
Коммит
473d3dc22d
|
@ -9,10 +9,11 @@
|
|||
#include <algorithm>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/SizePrintfMacros.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "mozilla/UseCounter.h"
|
||||
|
||||
|
@ -2532,7 +2533,7 @@ ConvertJSValueToByteString(JSContext* cx, JS::Handle<JS::Value> v,
|
|||
// 20 digits, plus one more for the null terminator.
|
||||
char index[21];
|
||||
static_assert(sizeof(size_t) <= 8, "index array too small");
|
||||
snprintf_literal(index, "%d", badCharIndex);
|
||||
snprintf_literal(index, "%" PRIuSIZE, badCharIndex);
|
||||
// A char16_t is 16 bits long. The biggest unsigned 16 bit
|
||||
// number (65,535) has 5 digits, plus one more for the null
|
||||
// terminator.
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
|
||||
#include "nsBidiPresUtils.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
static const int MIN_LINES_NEEDING_CURSOR = 20;
|
||||
|
||||
static const char16_t kDiscCharacter = 0x2022;
|
||||
|
@ -1446,7 +1448,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
ListTag(stdout);
|
||||
char buf[400];
|
||||
snprintf_literal(buf,
|
||||
": %lld elapsed (%lld per line) (%d lines; %d new lines)",
|
||||
": %" PRId64 " elapsed (%" PRId64 " per line) (%d lines; %d new lines)",
|
||||
delta, perLineDelta, numLines, ectc - ctc);
|
||||
printf("%s\n", buf);
|
||||
}
|
||||
|
@ -6624,7 +6626,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
ListTag(stdout);
|
||||
char buf[400];
|
||||
snprintf_literal(buf,
|
||||
": %lld elapsed (%lld per line) lines=%d drawn=%d skip=%d",
|
||||
": %" PRId64 " elapsed (%" PRId64 " per line) lines=%d drawn=%d skip=%d",
|
||||
delta, deltaPerLine,
|
||||
numLines, drawnLines, numLines - drawnLines);
|
||||
printf("%s\n", buf);
|
||||
|
|
|
@ -1199,7 +1199,7 @@ ProcessUserNotice(SECItem* derNotice, nsAString& text,
|
|||
unsigned long number;
|
||||
char buffer[60];
|
||||
if (SEC_ASN1DecodeInteger(*itemList, &number) == SECSuccess) {
|
||||
snprintf_literal(buffer, "#%d", number);
|
||||
snprintf_literal(buffer, "#%lu", number);
|
||||
if (itemList != notice->noticeReference.noticeNumbers)
|
||||
text.AppendLiteral(", ");
|
||||
AppendASCIItoUTF16(buffer, text);
|
||||
|
@ -1488,7 +1488,7 @@ ProcessMSCAVersion(SECItem *extData,
|
|||
|
||||
/* Apparently, the encoding is <minor><major>, with 16 bits each */
|
||||
char buf[50];
|
||||
if (snprintf_literal(buf, "%d.%d", version & 0xFFFF, version >> 16) <= 0) {
|
||||
if (snprintf_literal(buf, "%lu.%lu", version & 0xFFFF, version >> 16) <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче