Bug 746517 - gnc-sql-backend.c compile fails with -Werror=format-nonliteral

Use GCC pragma to disable the warning in the one place that trips it.
This commit is contained in:
John Ralls 2015-03-21 10:37:18 +09:00
parent 3f905e73c6
commit caf5a82dbc

View File

@ -1855,6 +1855,10 @@ typedef void (*TimespecSetterFunc)( const gpointer, Timespec );
#define TIMESPEC_STR_FORMAT "%04d%02d%02d%02d%02d%02d"
#define TIMESPEC_COL_SIZE (4+2+2+2+2+2)
/* This is required because we're passing be->timespace_format to
* g_strdup_printf.
*/
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
gchar*
gnc_sql_convert_timespec_to_string( const GncSqlBackend* be, Timespec ts )
{
@ -1873,6 +1877,7 @@ gnc_sql_convert_timespec_to_string( const GncSqlBackend* be, Timespec ts )
gnc_tm_free (tm);
return datebuf;
}
#pragma GCC diagnostic warning "-Wformat-nonliteral"
static void
load_timespec( const GncSqlBackend* be, GncSqlRow* row,