Bug 1235186 - Part 1: Fix -Wformat warnings in layout/. r=dholbert

layout/base/AccessibleCaret.cpp:129:48 [-Wformat-extra-args] data argument not used by format string
layout/generic/nsContainerFrame.cpp:425:71 [-Wformat] more '%' conversions than data arguments
layout/style/FontFaceSet.cpp:798:10 [-Wformat] format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long')
layout/style/Loader.cpp:1817:12 [-Wformat] format specifies type 'unsigned int' but the argument has type 'nsICSSLoaderObserver *'
layout/style/Loader.cpp:1817:35 [-Wformat] format specifies type 'unsigned int' but the argument has type 'mozilla::css::SheetLoadData *'
layout/style/Loader.cpp:1827:12 [-Wformat] format specifies type 'unsigned int' but the argument has type 'nsICSSLoaderObserver *'
layout/style/Loader.cpp:1827:23 [-Wformat] format specifies type 'char *' but the argument has type 'mozilla::css::SheetLoadData *'
This commit is contained in:
Chris Peterson 2015-12-24 16:04:20 -07:00
Родитель 4f6bd2b0d7
Коммит 68d33ca9b5
4 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -126,7 +126,7 @@ AccessibleCaret::SetSelectionBarEnabled(bool aEnabled)
return;
}
AC_LOG("Set selection bar %s", __FUNCTION__, aEnabled ? "Enabled" : "Disabled");
AC_LOG("Set selection bar %s", aEnabled ? "Enabled" : "Disabled");
ErrorResult rv;
CaretElement()->ClassList()->Toggle(NS_LITERAL_STRING("no-bar"),

Просмотреть файл

@ -423,7 +423,7 @@ nsContainerFrame::CreateViewForFrame(nsIFrame* aFrame,
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
("nsContainerFrame::CreateViewForFrame: frame=%p view=%p",
aFrame));
aFrame, view));
}
/**

Просмотреть файл

@ -17,6 +17,7 @@
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/Logging.h"
#include "mozilla/Preferences.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Snprintf.h"
#include "mozilla/Telemetry.h"
#include "nsCORSListenerProxy.h"
@ -792,7 +793,7 @@ FontFaceSet::UpdateRules(const nsTArray<nsFontFaceRuleContainer>& aRules)
mUserFontSet->mLocalRulesUsed = false;
if (LOG_ENABLED() && !mRuleFaces.IsEmpty()) {
LOG(("userfonts (%p) userfont rules update (%s) rule count: %d",
LOG(("userfonts (%p) userfont rules update (%s) rule count: %" PRIuSIZE,
mUserFontSet.get(),
(modified ? "modified" : "not modified"),
mRuleFaces.Length()));

Просмотреть файл

@ -1813,7 +1813,7 @@ Loader::SheetComplete(SheetLoadData* aLoadData, nsresult aStatus)
SheetLoadData* data = datasToNotify[i];
NS_ASSERTION(data && data->mMustNotify, "How did this data get here?");
if (data->mObserver) {
LOG((" Notifying observer 0x%x for data 0x%x. wasAlternate: %d",
LOG((" Notifying observer %p for data %p. wasAlternate: %d",
data->mObserver.get(), data, data->mWasAlternate));
data->mObserver->StyleSheetLoaded(data->mSheet, data->mWasAlternate,
aStatus);
@ -1823,7 +1823,7 @@ Loader::SheetComplete(SheetLoadData* aLoadData, nsresult aStatus)
nsCOMPtr<nsICSSLoaderObserver> obs;
while (iter.HasMore()) {
obs = iter.GetNext();
LOG((" Notifying global observer 0x%x for data 0x%s. wasAlternate: %d",
LOG((" Notifying global observer %p for data %p. wasAlternate: %d",
obs.get(), data, data->mWasAlternate));
obs->StyleSheetLoaded(data->mSheet, data->mWasAlternate, aStatus);
}