From e26a01dd6235e1e21840808a806bb91f12670131 Mon Sep 17 00:00:00 2001 From: ehouse Date: Thu, 6 Nov 2008 03:16:09 +0000 Subject: [PATCH] New Ubuntu has a stricter compiler... --- common/mempool.c | 4 ++-- common/model.c | 2 +- common/strutils.c | 2 +- linux/gtkask.c | 2 +- linux/gtkmain.c | 2 +- linux/linuxmain.c | 5 +++-- linux/linuxutl.c | 3 +-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/mempool.c b/common/mempool.c index 92ef1346a..a122fb515 100644 --- a/common/mempool.c +++ b/common/mempool.c @@ -248,7 +248,7 @@ mpool_stats( MemPoolCtx* mpool, XWStreamCtxt* stream ) if ( !!stream ) { stream_putString( stream, buf ); } else { - XP_LOGF( buf ); + XP_LOGF( "%s", buf ); } for ( entry = mpool->usedList; !!entry; entry = entry->next ) { @@ -258,7 +258,7 @@ mpool_stats( MemPoolCtx* mpool, XWStreamCtxt* stream ) if ( !!stream ) { stream_putString( stream, buf ); } else { - XP_LOGF( buf ); + XP_LOGF( "%s", buf ); } } } /* mpool_stats */ diff --git a/common/model.c b/common/model.c index 62d20861e..3d00e760b 100644 --- a/common/model.c +++ b/common/model.c @@ -1513,7 +1513,7 @@ printMovePre( ModelCtxt* model, XP_U16 XP_UNUSED(moveN), StackEntry* entry, if ( isPass ) { format = util_getUserString( model->vol.util, STR_PASS ); - XP_SNPRINTF( buf, sizeof(buf), format ); + XP_SNPRINTF( buf, sizeof(buf), "%s", format ); } else { if ( isHorizontal ) { format = util_getUserString( model->vol.util, STRS_MOVE_ACROSS ); diff --git a/common/strutils.c b/common/strutils.c index 85729e125..60154a9bd 100644 --- a/common/strutils.c +++ b/common/strutils.c @@ -273,7 +273,7 @@ log_hex( const XP_U8* memp, XP_U16 len, const char* tag ) } XP_SNPRINTF( buf, sizeof(buf), "%s[%d]: %s %s", tag, oldOffset, vals, chars ); - XP_LOGF( buf ); + XP_LOGF( "%s", buf ); } } #endif diff --git a/linux/gtkask.c b/linux/gtkask.c index 6a60978de..52d94d24d 100644 --- a/linux/gtkask.c +++ b/linux/gtkask.c @@ -29,7 +29,7 @@ gtkask( const gchar *message, GtkButtonsType buttons ) GtkWidget* dlg = gtk_message_dialog_new( NULL, /* parent */ GTK_MESSAGE_QUESTION, GTK_DIALOG_MODAL, - buttons, message ); + buttons, "%s", message ); gint response = gtk_dialog_run( GTK_DIALOG(dlg) ); gtk_widget_destroy( dlg ); return response == GTK_RESPONSE_OK || response == GTK_RESPONSE_YES; diff --git a/linux/gtkmain.c b/linux/gtkmain.c index 12e1338bb..a3b0cfe04 100644 --- a/linux/gtkmain.c +++ b/linux/gtkmain.c @@ -1385,7 +1385,7 @@ gtk_util_userError( XW_UtilCtxt* uc, UtilErrID id ) XP_LOGF( "%s(%d)", __func__, id ); if ( silent ) { - XP_LOGF( message ); + XP_LOGF( "%s", message ); } else { gtkUserError( globals, message ); } diff --git a/linux/linuxmain.c b/linux/linuxmain.c index 29c0f3491..ca580236b 100644 --- a/linux/linuxmain.c +++ b/linux/linuxmain.c @@ -128,7 +128,7 @@ catOnClose( XWStreamCtxt* stream, void* XP_UNUSED(closure) ) stream_getBytes( stream, buffer, nBytes ); buffer[nBytes] = '\0'; - fprintf( stderr, buffer ); + fprintf( stderr, "%s", buffer ); free( buffer ); } /* catOnClose */ @@ -645,7 +645,7 @@ main( int argc, char** argv ) { int i; for ( i = 0; i < argc; ++i ) { - XP_LOGF( argv[i] ); + XP_LOGF( "%s", argv[i] ); } } #endif @@ -995,6 +995,7 @@ main( int argc, char** argv ) dict_destroy( mainParams.dict ); linux_util_vt_destroy( mainParams.util ); + XP_LOGF( "exiting main" ); return 0; } /* main */ diff --git a/linux/linuxutl.c b/linux/linuxutl.c index db14f4e54..135d0e4f0 100644 --- a/linux/linuxutl.c +++ b/linux/linuxutl.c @@ -51,8 +51,7 @@ linux_debugf( const char* format, ... ) va_end(ap); - fprintf( stderr, buf ); - fprintf( stderr, "\n" ); + fprintf( stderr, "%s\n", buf ); } #endif