IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2006, 2:32:39 PM (20 years ago)
Author:
jhoblitt
Message:

add gcc format attributes to psStringAppend(), psStringPrepend(), p_psDBRunQuery(), & p_psDBRunQueryPrepared()
fix all of the format params errors found by the new attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psString.h

    r8607 r8610  
    1414 *  @author David Robbins, MHPCC
    1515 *
    16  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2006-08-25 22:42:37 $
     16 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2006-08-26 00:32:39 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9595 * @return ssize_t:     The length of the new string (excluding '\0')
    9696 */
     97#ifdef __GNUC__
    9798ssize_t psStringAppend(
    9899    char **dest,                        ///< existing string
    99100    const char *format,                 ///< format to append
    100101    ...                                 ///< format arguments
    101 );
     102) __attribute__((format(printf, 2, 3)));
     103#else // __GNUC__
     104ssize_t psStringAppend(
     105    char **dest,                        ///< existing string
     106    const char *format,                 ///< format to append
     107    ...                                 ///< format arguments
     108);
     109#endif // __GNUC__
    102110
    103111/** Appends a format onto a string
     
    121129 * @return ssize_t:     The length of the new string (excluding '\0')
    122130 */
     131#ifdef __GNUC__
    123132ssize_t psStringPrepend(
    124133    char **dest,                        ///< existing string
    125134    const char *format,                 ///< format to append
    126135    ...                                 ///< format arguments
    127 );
     136) __attribute__((format(printf, 2, 3)));
     137# else // __GNUC__
     138    ssize_t psStringPrepend(
     139        char **dest,                        ///< existing string
     140        const char *format,                 ///< format to append
     141        ...                                 ///< format arguments
     142    );
     143#endif // __GNUC__
    128144
    129145/** Prepends a format onto a string
Note: See TracChangeset for help on using the changeset viewer.