mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
lazy: use glib to avoid gcc warnings
This commit is contained in:
parent
3bb6f842b2
commit
05892c630e
2 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ BUILD_DIR ?= .
|
|||
ifeq ($(MEMDEBUG),TRUE)
|
||||
DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING -DNUMBER_KEY_AS_INDEX
|
||||
DEFINES += -DCOMMS_CHECKSUM
|
||||
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0 -Wno-format-truncation
|
||||
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0
|
||||
# DEFINES += -DDEBUG_HASHING
|
||||
CFLAGS += -DDEBUG_TS -rdynamic
|
||||
PLATFORM = obj_linux_memdbg
|
||||
|
|
|
@ -85,12 +85,12 @@ static void writeHeader( XWStreamCtxt* stream, SMS_CMD cmd );
|
|||
static void
|
||||
lock_queue( LinSMSData* storage )
|
||||
{
|
||||
char lock[256];
|
||||
snprintf( lock, sizeof(lock), "%s/%s", storage->myQueue, LOCK_FILE );
|
||||
gchar* lock = g_strdup_printf( "%s/%s", storage->myQueue, LOCK_FILE );
|
||||
FILE* fp = fopen( lock, "w" );
|
||||
XP_ASSERT( !!fp );
|
||||
XP_ASSERT( NULL == storage->lock );
|
||||
storage->lock = fp;
|
||||
g_free( lock );
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -162,8 +162,7 @@ decodeAndDelete( LinSMSData* storage, const gchar* name,
|
|||
{
|
||||
LOG_FUNC();
|
||||
XP_S16 nRead = -1;
|
||||
char path[256];
|
||||
snprintf( path, sizeof(path), "%s/%s", storage->myQueue, name );
|
||||
gchar* path = g_strdup_printf( "%s/%s", storage->myQueue, name );
|
||||
|
||||
gchar* contents;
|
||||
gsize length;
|
||||
|
@ -173,6 +172,7 @@ decodeAndDelete( LinSMSData* storage, const gchar* name,
|
|||
g_file_get_contents( path, &contents, &length, NULL );
|
||||
XP_ASSERT( success );
|
||||
unlink( path );
|
||||
g_free( path );
|
||||
|
||||
char phone[32];
|
||||
int port;
|
||||
|
|
Loading…
Reference in a new issue