VirtualBox

儲存庫 vbox 的更動 68474


忽略:
時間撮記:
2017-8-18 下午03:39:04 (7 年 以前)
作者:
vboxsync
訊息:

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.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • 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 */
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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