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:
@ -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 */
|
||||
|
Reference in New Issue
Block a user