From 52ce20589a8bac4eccaea043b1fe283daaf4f9e3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 10 Sep 2011 23:12:46 +0300 Subject: Add missing format attributes Add __attribute__ decorations for printf format checking to the places that were missing them. Fix the resulting warnings. Add -Wmissing-format-attribute to the standard set of warnings for GCC, so these don't happen again. The warning fixes here are relatively harmless. The one serious problem discovered by this was already committed earlier in cf15fb5cabfbc71e07be23cfbc813daee6c5014f. --- src/interfaces/ecpg/ecpglib/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces/ecpg/ecpglib/execute.c') diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 2fb54392c9e..a288b3ff125 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -332,7 +332,7 @@ ecpg_store_result(const PGresult *results, int act_field, */ if ((var->arrsize > 0 && ntuples > var->arrsize) || (var->ind_arrsize > 0 && ntuples > var->ind_arrsize)) { - ecpg_log("ecpg_store_result on line %d: incorrect number of matches; %d don't fit into array of %d\n", + ecpg_log("ecpg_store_result on line %d: incorrect number of matches; %d don't fit into array of %ld\n", stmt->lineno, ntuples, var->arrsize); ecpg_raise(stmt->lineno, INFORMIX_MODE(stmt->compat) ? ECPG_INFORMIX_SUBSELECT_NOT_ONE : ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL); return false; -- cgit v1.2.3