1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

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
cf15fb5cab.
This commit is contained in:
Peter Eisentraut
2011-09-10 23:12:46 +03:00
parent 96a8aed4cb
commit 52ce20589a
13 changed files with 87 additions and 18 deletions

View File

@ -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 */