Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 8602)
+++ trunk/psLib/src/db/psDB.c	(revision 8610)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-25 22:02:40 $
+ *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 00:32:39 $
  *
  *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
@@ -1252,5 +1252,5 @@
         } else if (item->type == PS_DATA_STRING) {
             // + column name + _ + varchar( + length + )
-            psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
+            psStringAppend(&query, "%s VARCHAR(%s)", item->name, (char *)item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
@@ -1289,7 +1289,7 @@
         for (int i = 0; i < psArrayLength(pKeys); i++) {
             if (i < 1) {
-                psStringAppend(&query, "%s", pKeys->data[i]);
+                psStringAppend(&query, "%s", (char *)pKeys->data[i]);
             } else {
-                psStringAppend(&query, ", %s", pKeys->data[i]);
+                psStringAppend(&query, ", %s", (char *)pKeys->data[i]);
             }
         }
@@ -1642,7 +1642,7 @@
                 // very large TEXT columns that really shouldn't be
                 // used in a where clause...
-                psStringAppend(&query, "%s LIKE '%s'", item->name, item->data.V);
+                psStringAppend(&query, "%s LIKE '%s'", item->name, (char *)item->data.V);
             } else {
-                psStringAppend(&query, "%s = '%s'", item->name, item->data.V);
+                psStringAppend(&query, "%s = '%s'", item->name, (char *)item->data.V);
             }
         }
Index: trunk/psLib/src/db/psDB.h
===================================================================
--- trunk/psLib/src/db/psDB.h	(revision 8602)
+++ trunk/psLib/src/db/psDB.h	(revision 8610)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-15 02:28:13 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 00:32:39 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -90,9 +90,18 @@
  * @return bool:    true on success
  */
+#ifdef __GNUC__
 bool p_psDBRunQuery(
     psDB *dbh,                         ///< Database handle
     const char *format,                ///< SQL string to execute
     ...                                ///< Arguments for name formatting and metadata item data.
-);
+) __attribute__((format(printf, 2, 3)));
+
+#else // __GNUC__
+bool p_psDBRunQuery(
+    psDB *dbh,                         ///< Database handle
+    const char *format,                ///< SQL string to execute
+    ...                                ///< Arguments for name formatting and metadata item data.
+);
+#endif // __GNUC__
 
 /** Executes a SQL query as a prepared statement
@@ -104,4 +113,5 @@
  * @return long:    the number of database rows affected
  */
+#ifdef __GNUC__
 long p_psDBRunQueryPrepared(
     psDB *dbh,                          ///< Database handle
@@ -109,5 +119,13 @@
     const char *format,                 ///< SQL string to execute
     ...
-);
+) __attribute__((format(printf, 3, 4)));
+#else // __GNUC__
+long p_psDBRunQueryPrepared(
+    psDB *dbh,                          ///< Database handle
+    const psArray *rowSet,              ///< row data as psArray of psMetadata
+    const char *format,                 ///< SQL string to execute
+    ...
+);
+#endif // __GNUC__
 
 /** Fetches the result of a SQL query
