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

Unified Diff: runtime/vm/os.h

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index e1899ab8afe47a0a6212b27dc2e734712dd09b47..e33b274f7122fd2ec583676464fc8dcba59b8368 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -62,8 +62,8 @@ class OS {
static void Sleep(int64_t millis);
// Print formatted output to stdout/stderr for debugging.
- static void Print(const char* format, ...);
- static void PrintErr(const char* format, ...);
+ static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
+ static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
static void VFPrint(FILE* stream, const char* format, va_list args);
// Print formatted output info a buffer.
//
@@ -81,7 +81,8 @@ class OS {
// by glibc 2.1+ with one exception: the C99 standard allows a
// negative return value. We will terminate the vm rather than let
// that occur.
- static int SNPrint(char* str, size_t size, const char* format, ...);
+ static int SNPrint(char* str, size_t size, const char* format, ...)
+ PRINTF_ATTRIBUTE(3, 4);
static int VSNPrint(char* str, size_t size,
const char* format,
va_list args);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698