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.c

    r8602 r8610  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-08-25 22:02:40 $
     14 *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-08-26 00:32:39 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    12521252        } else if (item->type == PS_DATA_STRING) {
    12531253            // + column name + _ + varchar( + length + )
    1254             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
     1254            psStringAppend(&query, "%s VARCHAR(%s)", item->name, (char *)item->data.V);
    12551255        } else {
    12561256            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
     
    12891289        for (int i = 0; i < psArrayLength(pKeys); i++) {
    12901290            if (i < 1) {
    1291                 psStringAppend(&query, "%s", pKeys->data[i]);
     1291                psStringAppend(&query, "%s", (char *)pKeys->data[i]);
    12921292            } else {
    1293                 psStringAppend(&query, ", %s", pKeys->data[i]);
     1293                psStringAppend(&query, ", %s", (char *)pKeys->data[i]);
    12941294            }
    12951295        }
     
    16421642                // very large TEXT columns that really shouldn't be
    16431643                // used in a where clause...
    1644                 psStringAppend(&query, "%s LIKE '%s'", item->name, item->data.V);
     1644                psStringAppend(&query, "%s LIKE '%s'", item->name, (char *)item->data.V);
    16451645            } else {
    1646                 psStringAppend(&query, "%s = '%s'", item->name, item->data.V);
     1646                psStringAppend(&query, "%s = '%s'", item->name, (char *)item->data.V);
    16471647            }
    16481648        }
Note: See TracChangeset for help on using the changeset viewer.