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/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces/ecpg/ecpglib/error.c') diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c index 58024f47b0c..54fb6f94508 100644 --- a/src/interfaces/ecpg/ecpglib/error.c +++ b/src/interfaces/ecpg/ecpglib/error.c @@ -335,7 +335,7 @@ ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat) sqlca->sqlcode = ECPG_PGSQL; /* %.*s is safe here as long as sqlstate is all-ASCII */ - ecpg_log("raising sqlstate %.*s (sqlcode %d): %s\n", + ecpg_log("raising sqlstate %.*s (sqlcode %ld): %s\n", sizeof(sqlca->sqlstate), sqlca->sqlstate, sqlca->sqlcode, sqlca->sqlerrm.sqlerrmc); /* free all memory we have allocated for the user */ -- cgit v1.2.3