src/share/vm/utilities/ostream.hpp

changeset 6680
78bbf4d43a14
parent 6535
f42c10a3d4b1
child 6876
710a3c8b516e
child 6904
0982ec23da03
     1.1 --- a/src/share/vm/utilities/ostream.hpp	Thu May 15 18:23:26 2014 -0400
     1.2 +++ b/src/share/vm/utilities/ostream.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 @@ -53,7 +53,7 @@
    1.11     static const char* do_vsnprintf(char* buffer, size_t buflen,
    1.12                                     const char* format, va_list ap,
    1.13                                     bool add_cr,
    1.14 -                                   size_t& result_len);
    1.15 +                                   size_t& result_len)  ATTRIBUTE_PRINTF(3, 0);
    1.16  
    1.17   public:
    1.18     // creation
    1.19 @@ -80,10 +80,10 @@
    1.20     void set_position(int pos)   { _position = pos; }
    1.21  
    1.22     // printing
    1.23 -   void print(const char* format, ...);
    1.24 -   void print_cr(const char* format, ...);
    1.25 -   void vprint(const char *format, va_list argptr);
    1.26 -   void vprint_cr(const char* format, va_list argptr);
    1.27 +   void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
    1.28 +   void print_cr(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
    1.29 +   void vprint(const char *format, va_list argptr) ATTRIBUTE_PRINTF(2, 0);
    1.30 +   void vprint_cr(const char* format, va_list argptr) ATTRIBUTE_PRINTF(2, 0);
    1.31     void print_raw(const char* str)            { write(str, strlen(str)); }
    1.32     void print_raw(const char* str, int len)   { write(str,         len); }
    1.33     void print_raw_cr(const char* str)         { write(str, strlen(str)); cr(); }
    1.34 @@ -275,10 +275,10 @@
    1.35    ~staticBufferStream() {};
    1.36    virtual void write(const char* c, size_t len);
    1.37    void flush();
    1.38 -  void print(const char* format, ...);
    1.39 -  void print_cr(const char* format, ...);
    1.40 -  void vprint(const char *format, va_list argptr);
    1.41 -  void vprint_cr(const char* format, va_list argptr);
    1.42 +  void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
    1.43 +  void print_cr(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
    1.44 +  void vprint(const char *format, va_list argptr) ATTRIBUTE_PRINTF(2, 0);
    1.45 +  void vprint_cr(const char* format, va_list argptr) ATTRIBUTE_PRINTF(2, 0);
    1.46  };
    1.47  
    1.48  // In the non-fixed buffer case an underlying buffer will be created and

mercurial