Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1930)

Unified Diff: sandbox/win/sandbox_poc/pocdll/invasive.cc

Issue 543923002: win/clang: Fix all remaining -Wformat warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sandbox/win/sandbox_poc/pocdll/invasive.cc
diff --git a/sandbox/win/sandbox_poc/pocdll/invasive.cc b/sandbox/win/sandbox_poc/pocdll/invasive.cc
index df3661243a8983b5e7901f0558ef2d1f7028974d..9ee13b0cb9dc538693b094ef068b4ddcd77efdfc 100644
--- a/sandbox/win/sandbox_poc/pocdll/invasive.cc
+++ b/sandbox/win/sandbox_poc/pocdll/invasive.cc
@@ -35,11 +35,11 @@ void POCDLL_API TestThreadBombing(HANDLE log) {
0, // No creation flags
&tid);
if (thread) {
- fprintf(output, "[GRANTED] Creating thread with tid 0x%X\r\n", tid);
+ fprintf(output, "[GRANTED] Creating thread with tid 0x%lX\r\n", tid);
::CloseHandle(thread);
number_errors = 0;
} else {
- fprintf(output, "[BLOCKED] Creating thread. Error %d\r\n",
+ fprintf(output, "[BLOCKED] Creating thread. Error %ld\r\n",
::GetLastError());
number_errors++;
}
@@ -90,10 +90,10 @@ void POCDLL_API TestTakeAllCpu(HANDLE log) {
::SetThreadAffinityMask(thread, affinity_mask);
if (::SetThreadPriority(thread, REALTIME_PRIORITY_CLASS)) {
- fprintf(output, "[GRANTED] Set thread(%d) priority to Realtime\r\n",
+ fprintf(output, "[GRANTED] Set thread(%ld) priority to Realtime\r\n",
tid);
} else {
- fprintf(output, "[BLOCKED] Set thread(%d) priority to Realtime\r\n",
+ fprintf(output, "[BLOCKED] Set thread(%ld) priority to Realtime\r\n",
tid);
}
@@ -103,7 +103,7 @@ void POCDLL_API TestTakeAllCpu(HANDLE log) {
system_mask = system_mask >> 1;
}
} else {
- fprintf(output, "[ERROR] Cannot get affinity mask. Error %d\r\n",
+ fprintf(output, "[ERROR] Cannot get affinity mask. Error %ld\r\n",
::GetLastError());
}
}

Powered by Google App Engine
This is Rietveld 408576698