summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-08-15 21:03:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-08-15 21:03:45 +0200
commit13618b73e353f9016f7c890e6b51eda2229737d1 (patch)
tree0031cbf4597c3e51ee1f0e3796aa00f7f6d057a2
parent5f10ba05fcbc9358b0b7bd6ac1aa87e5afd46959 (diff)
downloadtqt3-13618b73e353f9016f7c890e6b51eda2229737d1.tar.gz
tqt3-13618b73e353f9016f7c890e6b51eda2229737d1.zip
Fix 'format not a string literal' error
-rw-r--r--plugins/src/inputmethods/xim/qximinputcontext_x11.cpp2
-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
-rw-r--r--tools/qvfb/qvfbview.cpp18
7 files changed, 20 insertions, 20 deletions
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index 108a31e7a..b631d1916 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -742,7 +742,7 @@ void TQXIMInputContext::resetClientState()
void TQXIMInputContext::close( const TQString &errMsg )
{
- tqDebug( errMsg );
+ tqDebug( "%s", errMsg.latin1() );
emit deletionRequested();
}
diff --git a/src/3rdparty/sqlite/btree_rb.c b/src/3rdparty/sqlite/btree_rb.c
index ea4b3dda7..09d8e9a1e 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 58771aa78..93210666e 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 4540262be..b10e444e8 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 13c38b654..3d6b8cfbe 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 7abf5c59a..40739b36c 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -539,7 +539,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_MODE_READ_WRITE" ) {
v = SQL_MODE_READ_WRITE;
} else {
- tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( "TQODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0 );
@@ -564,7 +564,7 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_FALSE" ) {
v = SQL_FALSE;
} else {
- tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( "TQODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) v, 0 );
@@ -586,14 +586,14 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
} else if ( val == "SQL_OPT_TRACE_ON" ) {
v = SQL_OPT_TRACE_ON;
} else {
- tqWarning( TQString( "TQODBCDriver::open: Unknown option value '%1'" ).arg( *it ) );
+ tqWarning( "TQODBCDriver::open: Unknown option value '%s'", (*it).latin1() );
break;
}
r = SQLSetConnectAttr( hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0 );
}
#ifdef QT_CHECK_RANGE
else {
- tqWarning( TQString("TQODBCDriver::open: Unknown connection attribute '%1'").arg( opt ) );
+ tqWarning( "TQODBCDriver::open: Unknown connection attribute '%s'", opt.latin1() );
}
#endif
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {
diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp
index a23bab69b..15e5ca53e 100644
--- a/tools/qvfb/qvfbview.cpp
+++ b/tools/qvfb/qvfbview.cpp
@@ -282,26 +282,26 @@ static TQString qws_dataDir()
TQString dataDir = "/tmp/qtembedded-" + username;
if ( mkdir( dataDir.latin1(), 0700 ) ) {
if ( errno != EEXIST ) {
- tqFatal( TQString("Cannot create TQt/Embedded data directory: %1")
- .arg( dataDir ) );
+ tqFatal( "Cannot create TQt/Embedded data directory: %s",
+ dataDir.latin1() );
}
}
struct stat buf;
if ( lstat( dataDir.latin1(), &buf ) )
- tqFatal( TQString( "stat failed for TQt/Embedded data directory: %1" )
- .arg( dataDir ) );
+ tqFatal( "stat failed for TQt/Embedded data directory: %s",
+ dataDir.latin1() );
if ( !S_ISDIR( buf.st_mode ) )
- tqFatal( TQString( "%1 is not a directory" ).arg( dataDir ) );
+ tqFatal( "%s is not a directory", dataDir.latin1() );
if ( buf.st_uid != getuid() )
- tqFatal( TQString( "TQt/Embedded data directory is not owned by user %1" )
- .arg( getuid() ) );
+ tqFatal( "TQt/Embedded data directory is not owned by user %u",
+ getuid() );
if ( (buf.st_mode & 0677) != 0600 )
- tqFatal( TQString( "TQt/Embedded data directory has incorrect permissions: %1" )
- .arg( dataDir ) );
+ tqFatal( "TQt/Embedded data directory has incorrect permissions: %s",
+ dataDir.latin1() );
dataDir += "/";