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

Unified Diff: runtime/vm/zone.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/verifier.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.h
diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h
index 8054f4af95204e521772b8c8ff4e45c6ecf0261b..565f3a046054c80905be2ad94f900637e68cb790 100644
--- a/runtime/vm/zone.h
+++ b/runtime/vm/zone.h
@@ -152,7 +152,7 @@ class Zone : public StackResource {
}
// Make a zone-allocated string based on printf format and args.
- char* PrintToString(const char* format, ...);
+ char* PrintToString(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
VMHandles* handles() { return &handles_; }
@@ -180,7 +180,7 @@ inline uword BaseZone::AllocUnsafe(intptr_t size) {
// Round up the requested size to fit the alignment.
if (size > (kIntptrMax - kAlignment)) {
- FATAL1("BaseZone::Alloc: 'size' is too large: size=%ld", size);
+ FATAL1("BaseZone::Alloc: 'size' is too large: size=%"Pd"", size);
}
size = Utils::RoundUp(size, kAlignment);
@@ -203,7 +203,7 @@ template <class ElementType>
inline ElementType* BaseZone::Alloc(intptr_t len) {
const intptr_t element_size = sizeof(ElementType);
if (len > (kIntptrMax / element_size)) {
- FATAL2("BaseZone::Alloc: 'len' is too large: len=%ld, element_size=%ld",
+ FATAL2("BaseZone::Alloc: 'len' is too large: len=%"Pd", element_size=%"Pd,
len, element_size);
}
return reinterpret_cast<ElementType*>(AllocUnsafe(len * element_size));
« no previous file with comments | « runtime/vm/verifier.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698