VirtualBox

Changeset 56919 in vbox


Ignore:
Timestamp:
Jul 11, 2015 7:00:30 PM (9 years ago)
Author:
vboxsync
Message:

Introducing RT_IPRT_FORMAT_ATTR for the purpose of marking functions working on our special format strings.

Location:
trunk/include/iprt
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/assert.h

    r56377 r56919  
    9999 * @param   ...         Arguments to that string.
    100100 */
    101 RTDECL(void)    RTAssertMsg2(const char *pszFormat, ...);
     101RTDECL(void)    RTAssertMsg2(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    102102/**
    103103 * Weak version of RTAssertMsg2 that forwards to RTAssertMsg2WeakV.
     
    107107 * @copydoc RTAssertMsg2
    108108 */
    109 RTDECL(void)    RTAssertMsg2Weak(const char *pszFormat, ...);
     109RTDECL(void)    RTAssertMsg2Weak(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    110110
    111111/**
     
    115115 * @param   va          Arguments to that string.
    116116 */
    117 RTDECL(void)    RTAssertMsg2V(const char *pszFormat, va_list va);
     117RTDECL(void)    RTAssertMsg2V(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    118118/**
    119119 * Weak version of RTAssertMsg2V that can be overridden locally in a module to
     
    122122 * @copydoc RTAssertMsg2V
    123123 */
    124 RTDECL(void)    RTAssertMsg2WeakV(const char *pszFormat, va_list va);
     124RTDECL(void)    RTAssertMsg2WeakV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    125125
    126126/**
     
    131131 * @param   ...         Arguments to that string.
    132132 */
    133 RTDECL(void)    RTAssertMsg2Add(const char *pszFormat, ...);
     133RTDECL(void)    RTAssertMsg2Add(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    134134/**
    135135 * Weak version of RTAssertMsg2Add that forwards to RTAssertMsg2AddWeakV.
     
    139139 * @copydoc RTAssertMsg2Add
    140140 */
    141 RTDECL(void)    RTAssertMsg2AddWeak(const char *pszFormat, ...);
     141RTDECL(void)    RTAssertMsg2AddWeak(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    142142
    143143/**
     
    148148 * @param   va          Arguments to that string.
    149149 */
    150 RTDECL(void)    RTAssertMsg2AddV(const char *pszFormat, va_list va);
     150RTDECL(void)    RTAssertMsg2AddV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    151151/**
    152152 * Weak version of RTAssertMsg2AddV that can be overridden locally in a module
     
    155155 * @copydoc RTAssertMsg2AddV
    156156 */
    157 RTDECL(void)    RTAssertMsg2AddWeakV(const char *pszFormat, va_list va);
     157RTDECL(void)    RTAssertMsg2AddWeakV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    158158
    159159#ifdef IN_RING0
  • trunk/include/iprt/cdefs.h

    r56291 r56919  
    914914# define RT_THROW(type)
    915915#endif
     916
     917/** @def RT_IPRT_FORMAT_ATTR
     918 * Identifies a function taking an IPRT format string.
     919 * @param   a_iFmt  The index (1-based) of the format string argument.
     920 * @param   a_iArgs The index (1-based) of the first format argument, use 0 for
     921 *                  va_list.
     922 */
     923#if defined(__GNUC__) && defined(WITH_IPRT_FORMAT_ATTRIBUTE)
     924# define RT_IPRT_FORMAT_ATTR(a_iFmt, a_iArgs)   __attribute__((__iprt_format__(a_iFmt, a_iArgs)))
     925#else
     926# define RT_IPRT_FORMAT_ATTR(a_iFmt, a_iArgs)
     927#endif
     928
    916929
    917930/** @def RT_GCC_SUPPORTS_VISIBILITY_HIDDEN
  • trunk/include/iprt/log.h

    r56380 r56919  
    185185 * @param   ...         Optional arguments as specified in the format string.
    186186 */
    187 typedef DECLCALLBACK(void) FNRTLOGGER(const char *pszFormat, ...);
     187typedef DECLCALLBACK(void) FNRTLOGGER(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    188188/** Pointer to logger function. */
    189189typedef FNRTLOGGER *PFNRTLOGGER;
     
    214214 * @param   ...         Optional arguments specified in the format string.
    215215 */
    216 typedef DECLCALLBACK(void) FNRTLOGPHASEMSG(PRTLOGGER pLogger, const char *pszFormat, ...);
     216typedef DECLCALLBACK(void) FNRTLOGPHASEMSG(PRTLOGGER pLogger, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3);
    217217/** Pointer to header/footer message callback function. */
    218218typedef FNRTLOGPHASEMSG *PFNRTLOGPHASEMSG;
     
    458458
    459459
    460 RTDECL(void) RTLogPrintfEx(void *pvInstance, unsigned fFlags, unsigned iGroup, const char *pszFormat, ...);
     460RTDECL(void) RTLogPrintfEx(void *pvInstance, unsigned fFlags, unsigned iGroup,
     461                           const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5);
    461462
    462463
     
    17031704 * @remark  This is a worker function for LogRelIt.
    17041705 */
    1705 RTDECL(void) RTLogRelLogger(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, ...);
     1706RTDECL(void) RTLogRelLogger(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup,
     1707                            const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5);
    17061708
    17071709/**
     
    17191721 * @param   args        Format arguments.
    17201722 */
    1721 RTDECL(void) RTLogRelLoggerV(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, va_list args);
     1723RTDECL(void) RTLogRelLoggerV(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup,
     1724                             const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(4, 0);
    17221725
    17231726/**
     
    17291732 * @remark The API doesn't support formatting of floating point numbers at the moment.
    17301733 */
    1731 RTDECL(void) RTLogRelPrintf(const char *pszFormat, ...);
     1734RTDECL(void) RTLogRelPrintf(const char *pszFormat, ...)  RT_IPRT_FORMAT_ATTR(1, 2);
    17321735
    17331736/**
     
    17391742 * @remark The API doesn't support formatting of floating point numbers at the moment.
    17401743 */
    1741 RTDECL(void) RTLogRelPrintfV(const char *pszFormat, va_list args);
     1744RTDECL(void) RTLogRelPrintfV(const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(1, 0);
    17421745
    17431746/**
     
    19531956RTDECL(int) RTLogCreate(PRTLOGGER *ppLogger, uint32_t fFlags, const char *pszGroupSettings,
    19541957                        const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups,
    1955                         uint32_t fDestFlags, const char *pszFilenameFmt, ...);
     1958                        uint32_t fDestFlags, const char *pszFilenameFmt, ...) RT_IPRT_FORMAT_ATTR(8, 9);
    19561959
    19571960/**
     
    19901993                          uint32_t fDestFlags, PFNRTLOGPHASE pfnPhase, uint32_t cHistory,
    19911994                          uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot,
    1992                           char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, ...);
     1995                          char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, ...) RT_IPRT_FORMAT_ATTR(14, 15);
    19931996
    19941997/**
     
    20292032                           uint32_t fDestFlags, PFNRTLOGPHASE pfnPhase, uint32_t cHistory,
    20302033                           uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot,
    2031                            char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, va_list args);
     2034                           char *pszErrorMsg, size_t cchErrorMsg,
     2035                           const char *pszFilenameFmt, va_list args) RT_IPRT_FORMAT_ATTR(14, 0);
    20322036
    20332037/**
     
    22612265 * @param   ...         Format arguments.
    22622266 */
    2263 RTDECL(void) RTLogLogger(PRTLOGGER pLogger, void *pvCallerRet, const char *pszFormat, ...);
     2267RTDECL(void) RTLogLogger(PRTLOGGER pLogger, void *pvCallerRet, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4);
    22642268
    22652269/**
     
    22702274 * @param   args        Format arguments.
    22712275 */
    2272 RTDECL(void) RTLogLoggerV(PRTLOGGER pLogger, const char *pszFormat, va_list args);
     2276RTDECL(void) RTLogLoggerV(PRTLOGGER pLogger, const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(3, 0);
    22732277
    22742278/**
     
    22872291 * @remark  This is a worker function of LogIt.
    22882292 */
    2289 RTDECL(void) RTLogLoggerEx(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, ...);
     2293RTDECL(void) RTLogLoggerEx(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup,
     2294                           const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5);
    22902295
    22912296/**
     
    23032308 * @param   args        Format arguments.
    23042309 */
    2305 RTDECL(void) RTLogLoggerExV(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup, const char *pszFormat, va_list args);
     2310RTDECL(void) RTLogLoggerExV(PRTLOGGER pLogger, unsigned fFlags, unsigned iGroup,
     2311                            const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(4, 0);
    23062312
    23072313/**
     
    23132319 * @remark The API doesn't support formatting of floating point numbers at the moment.
    23142320 */
    2315 RTDECL(void) RTLogPrintf(const char *pszFormat, ...);
     2321RTDECL(void) RTLogPrintf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    23162322
    23172323/**
     
    23232329 * @remark The API doesn't support formatting of floating point numbers at the moment.
    23242330 */
    2325 RTDECL(void) RTLogPrintfV(const char *pszFormat, va_list args);
     2331RTDECL(void) RTLogPrintfV(const char *pszFormat, va_list args)  RT_IPRT_FORMAT_ATTR(1, 0);
    23262332
    23272333/**
     
    23332339 * @param   va              Format arguments.
    23342340 */
    2335 RTDECL(void) RTLogDumpPrintfV(void *pvUser, const char *pszFormat, va_list va);
     2341RTDECL(void) RTLogDumpPrintfV(void *pvUser, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
    23362342
    23372343
     
    23622368 * @param   args        Argument list.
    23632369 */
    2364 RTDECL(size_t) RTLogFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArg, const char *pszFormat, va_list args);
     2370RTDECL(size_t) RTLogFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArg, const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(3, 0);
    23652371
    23662372/**
     
    23792385 * @param   ...         Optional arguments specified in the format string.
    23802386 */
    2381 RTDECL(size_t) RTLogComPrintf(const char *pszFormat, ...);
     2387RTDECL(size_t) RTLogComPrintf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    23822388
    23832389/**
     
    23882394 * @param   args        Optional arguments specified in the format string.
    23892395 */
    2390 RTDECL(size_t)  RTLogComPrintfV(const char *pszFormat, va_list args);
     2396RTDECL(size_t)  RTLogComPrintfV(const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(1, 0);
    23912397
    23922398
     
    24982504 * @param   ...         Optional arguments specified in the format string.
    24992505 */
    2500 RTDECL(size_t) RTLogBackdoorPrintf(const char *pszFormat, ...);
     2506RTDECL(size_t) RTLogBackdoorPrintf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    25012507
    25022508/**
     
    25072513 * @param   args        Optional arguments specified in the format string.
    25082514 */
    2509 RTDECL(size_t)  RTLogBackdoorPrintfV(const char *pszFormat, va_list args);
     2515RTDECL(size_t)  RTLogBackdoorPrintfV(const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(1, 0);
    25102516
    25112517#endif /* VBOX */
  • trunk/include/iprt/message.h

    r56291 r56919  
    4545 * @param   ...             Format arguments.
    4646 */
    47 RTDECL(int)  RTMsgSetProgName(const char *pszFormat, ...);
     47RTDECL(int)  RTMsgSetProgName(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    4848
    4949/**
     
    5959 * @param   ...             Format arguments.
    6060 */
    61 RTDECL(int)  RTMsgError(const char *pszFormat, ...);
     61RTDECL(int)  RTMsgError(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    6262
    6363/**
     
    7373 * @param   va              Format arguments.
    7474 */
    75 RTDECL(int)  RTMsgErrorV(const char *pszFormat, va_list va);
     75RTDECL(int)  RTMsgErrorV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    7676
    7777/**
     
    8484 * @param   ...             Format arguments.
    8585 */
    86 RTDECL(RTEXITCODE) RTMsgErrorExit(RTEXITCODE enmExitcode, const char *pszFormat, ...);
     86RTDECL(RTEXITCODE) RTMsgErrorExit(RTEXITCODE enmExitcode, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3);
    8787
    8888/**
     
    9595 * @param   va              Format arguments.
    9696 */
    97 RTDECL(RTEXITCODE) RTMsgErrorExitV(RTEXITCODE enmExitCode, const char *pszFormat, va_list va);
     97RTDECL(RTEXITCODE) RTMsgErrorExitV(RTEXITCODE enmExitCode, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
    9898
    9999/**
     
    106106 * @param   ...             Format arguments.
    107107 */
    108 RTDECL(int) RTMsgErrorRc(int rc, const char *pszFormat, ...);
     108RTDECL(int) RTMsgErrorRc(int rc, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3);
    109109
    110110/**
     
    117117 * @param   va              Format arguments.
    118118 */
    119 RTDECL(int) RTMsgErrorRcV(int rc, const char *pszFormat, va_list va);
     119RTDECL(int) RTMsgErrorRcV(int rc, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
    120120
    121121/**
     
    147147 * @param   ...             Format arguments.
    148148 */
    149 RTDECL(int)  RTMsgWarning(const char *pszFormat, ...);
     149RTDECL(int)  RTMsgWarning(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    150150
    151151/**
     
    161161 * @param   va              Format arguments.
    162162 */
    163 RTDECL(int)  RTMsgWarningV(const char *pszFormat, va_list va);
     163RTDECL(int)  RTMsgWarningV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    164164
    165165/**
     
    175175 * @param   ...             Format arguments.
    176176 */
    177 RTDECL(int)  RTMsgInfo(const char *pszFormat, ...);
     177RTDECL(int)  RTMsgInfo(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    178178
    179179/**
     
    189189 * @param   va              Format arguments.
    190190 */
    191 RTDECL(int)  RTMsgInfoV(const char *pszFormat, va_list va);
     191RTDECL(int)  RTMsgInfoV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    192192
    193193/** @} */
  • trunk/include/iprt/stream.h

    r56291 r56919  
    7272 * @param   args            Arguments to the format string.
    7373 */
    74 RTR3DECL(int) RTStrmOpenFV(const char *pszMode, PRTSTREAM *ppStream, const char *pszFilenameFmt, va_list args);
     74RTR3DECL(int) RTStrmOpenFV(const char *pszMode, PRTSTREAM *ppStream, const char *pszFilenameFmt,
     75                           va_list args) RT_IPRT_FORMAT_ATTR(3, 0);
    7576
    7677/**
     
    8485 * @param   ...             Arguments to the format string.
    8586 */
    86 RTR3DECL(int) RTStrmOpenF(const char *pszMode, PRTSTREAM *ppStream, const char *pszFilenameFmt, ...);
     87RTR3DECL(int) RTStrmOpenF(const char *pszMode, PRTSTREAM *ppStream, const char *pszFilenameFmt, ...) RT_IPRT_FORMAT_ATTR(3, 4);
    8788
    8889/**
     
    275276 * @param   ...             Arguments specified by pszFormat.
    276277 */
    277 RTR3DECL(int) RTStrmPrintf(PRTSTREAM pStream, const char *pszFormat, ...);
     278RTR3DECL(int) RTStrmPrintf(PRTSTREAM pStream, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3);
    278279
    279280/**
     
    285286 * @param   args            Arguments specified by pszFormat.
    286287 */
    287 RTR3DECL(int) RTStrmPrintfV(PRTSTREAM pStream, const char *pszFormat, va_list args);
     288RTR3DECL(int) RTStrmPrintfV(PRTSTREAM pStream, const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(2, 0);
    288289
    289290/**
     
    294295 * @param   va              Arguments specified by pszFormat.
    295296 */
    296 RTR3DECL(void) RTStrmDumpPrintfV(void *pvUser, const char *pszFormat, va_list va);
     297RTR3DECL(void) RTStrmDumpPrintfV(void *pvUser, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
    297298
    298299/**
     
    303304 * @param   ...             Arguments specified by pszFormat.
    304305 */
    305 RTR3DECL(int) RTPrintf(const char *pszFormat, ...);
     306RTR3DECL(int) RTPrintf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2);
    306307
    307308/**
     
    312313 * @param   args            Arguments specified by pszFormat.
    313314 */
    314 RTR3DECL(int) RTPrintfV(const char *pszFormat, va_list args);
     315RTR3DECL(int) RTPrintfV(const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(1, 0);
    315316
    316317/** @} */
  • trunk/include/iprt/string.h

    r56291 r56919  
    17271727 * @param   InArgs      Argument list.
    17281728 */
    1729 RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, const char *pszFormat, va_list InArgs);
     1729RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat,
     1730                            const char *pszFormat, va_list InArgs) RT_IPRT_FORMAT_ATTR(5, 0);
    17301731
    17311732/**
     
    17441745 * @param   ...         Argument list.
    17451746 */
    1746 RTDECL(size_t) RTStrFormat(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, const char *pszFormat, ...);
     1747RTDECL(size_t) RTStrFormat(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat,
     1748                           const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(5, 6);
    17471749
    17481750/**
     
    17571759 * @param   fFlags          Flags, RTSTR_F_XXX.
    17581760 */
    1759 RTDECL(int) RTStrFormatNumber(char *psz, uint64_t u64Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, unsigned int fFlags);
     1761RTDECL(int) RTStrFormatNumber(char *psz, uint64_t u64Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision,
     1762                              unsigned int fFlags);
    17601763
    17611764/**
     
    19621965 * @param   ...         The format argument.
    19631966 */
    1964 RTDECL(size_t) RTStrPrintf(char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...);
     1967RTDECL(size_t) RTStrPrintf(char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4);
    19651968
    19661969
     
    19771980 * @param   args        The format argument.
    19781981 */
    1979 RTDECL(size_t) RTStrPrintfExV(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args);
     1982RTDECL(size_t) RTStrPrintfExV(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer,
     1983                              const char *pszFormat, va_list args)  RT_IPRT_FORMAT_ATTR(5, 0);
    19801984
    19811985/**
     
    19911995 * @param   ...         The format argument.
    19921996 */
    1993 RTDECL(size_t) RTStrPrintfEx(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...);
     1997RTDECL(size_t) RTStrPrintfEx(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer,
     1998                             const char *pszFormat, ...)  RT_IPRT_FORMAT_ATTR(5, 6);
    19941999
    19952000
     
    20212026 * @param   pszTag      Allocation tag used for statistics and such.
    20222027 */
    2023 RTDECL(int) RTStrAPrintfVTag(char **ppszBuffer, const char *pszFormat, va_list args, const char *pszTag);
     2028RTDECL(int) RTStrAPrintfVTag(char **ppszBuffer, const char *pszFormat, va_list args, const char *pszTag) RT_IPRT_FORMAT_ATTR(2, 0);
    20242029
    20252030/**
     
    20352040 * @param   ...         The format argument.
    20362041 */
    2037 DECLINLINE(int) RTStrAPrintf(char **ppszBuffer, const char *pszFormat, ...)
     2042DECLINLINE(int) RTStrAPrintf(char **ppszBuffer, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3)
    20382043{
    20392044    int     cbRet;
     
    20582063 * @param   ...         The format argument.
    20592064 */
    2060 DECLINLINE(int) RTStrAPrintfTag(char **ppszBuffer, const char *pszTag, const char *pszFormat, ...)
     2065DECLINLINE(int) RTStrAPrintfTag(char **ppszBuffer, const char *pszTag, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4)
    20612066{
    20622067    int     cbRet;
     
    20872092 * @param   pszTag      Allocation tag used for statistics and such.
    20882093 */
    2089 RTDECL(char *) RTStrAPrintf2VTag(const char *pszFormat, va_list args, const char *pszTag);
     2094RTDECL(char *) RTStrAPrintf2VTag(const char *pszFormat, va_list args, const char *pszTag) RT_IPRT_FORMAT_ATTR(1, 0);
    20902095
    20912096/**
     
    20972102 * @param   ...         The format argument.
    20982103 */
    2099 DECLINLINE(char *) RTStrAPrintf2(const char *pszFormat, ...)
     2104DECLINLINE(char *) RTStrAPrintf2(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2)
    21002105{
    21012106    char   *pszRet;
     
    21162121 * @param   ...         The format argument.
    21172122 */
    2118 DECLINLINE(char *) RTStrAPrintf2Tag(const char *pszTag, const char *pszFormat, ...)
     2123DECLINLINE(char *) RTStrAPrintf2Tag(const char *pszTag, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3)
    21192124{
    21202125    char   *pszRet;
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