VirtualBox

Changeset 68474 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Aug 18, 2017 3:39:04 PM (7 years ago)
Author:
vboxsync
Message:

cr_error.h: as far as I can tell, we're ending up using the IPRT string formatter if we ever format the strings. So, don't confuse GCC with saying it's standard printf format strings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_error.h

    r63199 r68474  
    1212#ifdef __cplusplus
    1313extern "C" {
    14 #endif
    15 
    16 #ifndef __GNUC__
    17 #define NORETURN_PRINTF
    18 #define PRINTF
    19 #elif defined IN_GUEST
    20 #define NORETURN_PRINTF __attribute__ ((__noreturn__,format(printf,1,2)))
    21 #define PRINTF __attribute__ ((format(printf,1,2)))
    22 #else
    23 #define NORETURN_PRINTF
    24 #define PRINTF
    2514#endif
    2615
     
    3928DECLEXPORT(void) crEnableWarnings(int onOff);
    4029
    41 DECLEXPORT(void) crDebug(const char *format, ... ) PRINTF;
     30DECLEXPORT(void) crDebug(const char *format, ... ) RT_IPRT_FORMAT_ATTR(1, 2);
    4231DECLEXPORT(void) crDbgCmdPrint(const char *description1, const char *description2, const char *cmd, ...);
    4332DECLEXPORT(void) crDbgCmdSymLoadPrint(const char *modName, const void*pvAddress);
    4433#if defined(DEBUG_misha) && defined(RT_OS_WINDOWS)
    45 typedef void FNCRDEBUG(const char *format, ... ) PRINTF;
     34typedef void FNCRDEBUG(const char *format, ... ) RT_IPRT_FORMAT_ATTR(1, 2);
    4635typedef FNCRDEBUG *PFNCRDEBUG;
    4736DECLINLINE(PFNCRDEBUG) crGetDebug() {return crDebug;}
    4837# define crWarning (RT_BREAKPOINT(), crDebug)
    4938#else
    50 DECLEXPORT(void) crWarning(const char *format, ... ) PRINTF;
     39DECLEXPORT(void) crWarning(const char *format, ... ) RT_IPRT_FORMAT_ATTR(1, 2);
    5140#endif
    52 DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF;
     41DECLEXPORT(void) crInfo(const char *format, ... ) RT_IPRT_FORMAT_ATTR(1, 2);
    5342
    54 DECLEXPORT(void) crError(const char *format, ... ) PRINTF /*NORETURN_PRINTF - it returns*/;
     43DECLEXPORT(void) crError(const char *format, ... ) RT_IPRT_FORMAT_ATTR(1, 2);
    5544
    5645/* Throw more info while opengl is not stable */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette