1.1 --- a/src/share/vm/utilities/debug.hpp Thu May 15 18:23:26 2014 -0400 1.2 +++ b/src/share/vm/utilities/debug.hpp Thu May 22 15:52:41 2014 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -43,17 +43,17 @@ 1.11 #define RES_BUFSZ 256 1.12 class FormatBufferResource : public FormatBufferBase { 1.13 public: 1.14 - FormatBufferResource(const char * format, ...); 1.15 + FormatBufferResource(const char * format, ...) ATTRIBUTE_PRINTF(2, 3); 1.16 }; 1.17 1.18 // Use stack for buffer 1.19 template <size_t bufsz = 256> 1.20 class FormatBuffer : public FormatBufferBase { 1.21 public: 1.22 - inline FormatBuffer(const char * format, ...); 1.23 - inline void append(const char* format, ...); 1.24 - inline void print(const char* format, ...); 1.25 - inline void printv(const char* format, va_list ap); 1.26 + inline FormatBuffer(const char * format, ...) ATTRIBUTE_PRINTF(2, 3); 1.27 + inline void append(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 1.28 + inline void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); 1.29 + inline void printv(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0); 1.30 1.31 char* buffer() { return _buf; } 1.32 int size() { return bufsz; } 1.33 @@ -223,7 +223,7 @@ 1.34 void report_unimplemented(const char* file, int line); 1.35 void report_untested(const char* file, int line, const char* message); 1.36 1.37 -void warning(const char* format, ...); 1.38 +void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2); 1.39 1.40 #ifdef ASSERT 1.41 // Compile-time asserts.