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

Unified Diff: src/wasm/wasm-result.h

Issue 1877453002: Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle ptrdiff_t format, which seems to make MSVC barf Created 4 years, 8 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
« no previous file with comments | « src/wasm/decoder.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-result.h
diff --git a/src/wasm/wasm-result.h b/src/wasm/wasm-result.h
index 59ab29ebe4060c4f54dbfea9e5cc60837745a709..b650c334d40faf3d4beb95960204af11484cec34 100644
--- a/src/wasm/wasm-result.h
+++ b/src/wasm/wasm-result.h
@@ -5,6 +5,7 @@
#ifndef V8_WASM_RESULT_H_
#define V8_WASM_RESULT_H_
+#include "src/base/compiler-specific.h"
#include "src/base/smart-pointers.h"
#include "src/globals.h"
@@ -93,13 +94,13 @@ class ErrorThrower {
ErrorThrower(Isolate* isolate, const char* context)
: isolate_(isolate), context_(context), error_(false) {}
- void Error(const char* fmt, ...);
+ PRINTF_FORMAT(2, 3) void Error(const char* fmt, ...);
template <typename T>
void Failed(const char* error, Result<T>& result) {
std::ostringstream str;
str << error << result;
- return Error(str.str().c_str());
+ return Error("%s", str.str().c_str());
}
bool error() const { return error_; }
« no previous file with comments | « src/wasm/decoder.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698