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/db/psDB.h

    r8336 r8610  
    1010 *  @author Joshua Hoblitt
    1111 *
    12  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-08-15 02:28:13 $
     12 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-26 00:32:39 $
    1414 *
    1515 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    9090 * @return bool:    true on success
    9191 */
     92#ifdef __GNUC__
    9293bool p_psDBRunQuery(
    9394    psDB *dbh,                         ///< Database handle
    9495    const char *format,                ///< SQL string to execute
    9596    ...                                ///< Arguments for name formatting and metadata item data.
    96 );
     97) __attribute__((format(printf, 2, 3)));
     98
     99#else // __GNUC__
     100bool p_psDBRunQuery(
     101    psDB *dbh,                         ///< Database handle
     102    const char *format,                ///< SQL string to execute
     103    ...                                ///< Arguments for name formatting and metadata item data.
     104);
     105#endif // __GNUC__
    97106
    98107/** Executes a SQL query as a prepared statement
     
    104113 * @return long:    the number of database rows affected
    105114 */
     115#ifdef __GNUC__
    106116long p_psDBRunQueryPrepared(
    107117    psDB *dbh,                          ///< Database handle
     
    109119    const char *format,                 ///< SQL string to execute
    110120    ...
    111 );
     121) __attribute__((format(printf, 3, 4)));
     122#else // __GNUC__
     123long p_psDBRunQueryPrepared(
     124    psDB *dbh,                          ///< Database handle
     125    const psArray *rowSet,              ///< row data as psArray of psMetadata
     126    const char *format,                 ///< SQL string to execute
     127    ...
     128);
     129#endif // __GNUC__
    112130
    113131/** Fetches the result of a SQL query
Note: See TracChangeset for help on using the changeset viewer.