summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-08-15 21:03:13 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-08-15 21:03:13 +0200
commit16f24a61f80fef5f29c81182a3bcf3906bdee7a7 (patch)
tree9b920b0b186e87e46d52d9ae9bd6fc74af29d28a /src
parent571716ebf8f6f16b92e676c4e5986cae3e577686 (diff)
downloadqt3-16f24a61f80fef5f29c81182a3bcf3906bdee7a7.tar.gz
qt3-16f24a61f80fef5f29c81182a3bcf3906bdee7a7.zip
Fix 'format not a string literal' error
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/sqlite/btree_rb.c2
-rw-r--r--src/3rdparty/sqlite/shell.c2
-rw-r--r--src/moc/moc.y4
-rw-r--r--src/moc/moc_yacc.cpp4
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp8
5 files changed, 10 insertions, 10 deletions
diff --git a/src/3rdparty/sqlite/btree_rb.c b/src/3rdparty/sqlite/btree_rb.c
index ea4b3dd..09d8e9a 100644
--- a/src/3rdparty/sqlite/btree_rb.c
+++ b/src/3rdparty/sqlite/btree_rb.c
@@ -311,7 +311,7 @@ static char *append_node(char * orig, BtRbNode *pNode, int indent)
static void print_node(BtRbNode *pNode)
{
char * str = append_node(0, pNode, 0);
- printf(str);
+ printf("%s", str);
/* Suppress a warning message about print_node() being unused */
(void)print_node;
diff --git a/src/3rdparty/sqlite/shell.c b/src/3rdparty/sqlite/shell.c
index 58771aa..9321066 100644
--- a/src/3rdparty/sqlite/shell.c
+++ b/src/3rdparty/sqlite/shell.c
@@ -688,7 +688,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
}else
if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
- fprintf(stderr,zHelp);
+ fprintf(stderr,"%s",zHelp);
}else
if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){
diff --git a/src/moc/moc.y b/src/moc/moc.y
index a507126..90f72ab 100644
--- a/src/moc/moc.y
+++ b/src/moc/moc.y
@@ -2873,8 +2873,8 @@ void generateClass() // generate C++ source code for a class
fn = &g->fileName[i];
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
fprintf( out, hdr2, (const char*)dstr );
- fprintf( out, hdr3 );
- fprintf( out, hdr4 );
+ fprintf( out, "%s", hdr3 );
+ fprintf( out, "%s", hdr4 );
if ( !g->noInclude ) {
/*
diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp
index cb307e6..bf152b3 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -5699,8 +5699,8 @@ void generateClass() // generate C++ source code for a class
fn = &g->fileName[i];
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
fprintf( out, hdr2, (const char*)dstr );
- fprintf( out, hdr3 );
- fprintf( out, hdr4 );
+ fprintf( out, "%s", hdr3 );
+ fprintf( out, "%s", hdr4 );
if ( !g->noInclude ) {
/*
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 8b0b58b..46c5a6c 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -539,7 +539,7 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts )
} else if ( val == "SQL_MODE_READ_WRITE" ) {
v = SQL_MODE_READ_WRITE;
} else {
- qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ qWarning( "QODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0 );
@@ -564,7 +564,7 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts )
} else if ( val == "SQL_FALSE" ) {
v = SQL_FALSE;
} else {
- qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ qWarning( "QODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) v, 0 );
@@ -586,14 +586,14 @@ bool QODBCPrivate::setConnectionOptions( const QString& connOpts )
} else if ( val == "SQL_OPT_TRACE_ON" ) {
v = SQL_OPT_TRACE_ON;
} else {
- qWarning( QString( "QODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ qWarning( "QODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0 );
}
#ifdef QT_CHECK_RANGE
else {
- qWarning( QString("QODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) );
+ qWarning( "QODBCDriver::open: Unknown connection attribute '%s'", opt.latin1() );
}
#endif
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {