extra compiler warnings
This commit is contained in:
parent
73acf78b8d
commit
abf820278b
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* LADI Session Handler (ladish)
|
||||
*
|
||||
* Copyright (C) 2009, 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
* Copyright (C) 2009,2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
*
|
||||
**************************************************************************
|
||||
* This file contains implementation of the "load studio" command
|
||||
|
@ -50,7 +50,7 @@ static void callback_chrdata(void * data, const XML_Char * s, int len)
|
|||
context_ptr->element[context_ptr->depth] == PARSE_CONTEXT_KEY ||
|
||||
context_ptr->element[context_ptr->depth] == PARSE_CONTEXT_APPLICATION)
|
||||
{
|
||||
if (context_ptr->data_used + len >= sizeof(context_ptr->data))
|
||||
if ((size_t)(context_ptr->data_used + len) >= sizeof(context_ptr->data))
|
||||
{
|
||||
log_error("xml parse max char data length reached");
|
||||
context_ptr->error = XML_TRUE;
|
||||
|
|
|
@ -444,7 +444,7 @@ loader_read_child_output(
|
|||
*buffer_ptr_ptr = buffer_ptr + left;
|
||||
}
|
||||
}
|
||||
while (ret == max_read); /* if we have read everything as much as we can, then maybe there is more to read */
|
||||
while ((size_t)ret == max_read); /* if we have read everything as much as we can, then maybe there is more to read */
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -97,7 +97,7 @@ loop:
|
|||
ret = read(fd, read_ptr, max);
|
||||
if (ret > 0)
|
||||
{
|
||||
ASSERT(ret <= max);
|
||||
ASSERT((size_t)ret <= max);
|
||||
read_ptr += ret;
|
||||
used_size += ret;
|
||||
ASSERT(used_size <= buffer_size);
|
||||
|
@ -191,7 +191,7 @@ procfs_get_process_cmdline(
|
|||
argc = 0;
|
||||
temp_ptr = cmdline_ptr;
|
||||
|
||||
while (temp_ptr - cmdline_ptr < cmdline_size)
|
||||
while ((size_t)(temp_ptr - cmdline_ptr) < cmdline_size)
|
||||
{
|
||||
if (*temp_ptr == 0)
|
||||
{
|
||||
|
@ -214,7 +214,7 @@ procfs_get_process_cmdline(
|
|||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
ASSERT(temp_ptr - cmdline_ptr < cmdline_size);
|
||||
ASSERT((size_t)(temp_ptr - cmdline_ptr) < cmdline_size);
|
||||
|
||||
argv[i] = strdup(temp_ptr);
|
||||
if (argv[i] == NULL)
|
||||
|
|
|
@ -117,7 +117,7 @@ ladish_recent_store_load(
|
|||
goto free;
|
||||
}
|
||||
|
||||
if (ret < (size_t)buffer_size)
|
||||
if ((size_t)ret < buffer_size)
|
||||
{
|
||||
/* this could be handled better but we dont care because it is expected for the file to be small enough */
|
||||
log_error("read(%s) returned less bytes than requested", store_ptr->path);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* LADI Session Handler (ladish)
|
||||
*
|
||||
* Copyright (C) 2010, 2011 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
* Copyright (C) 2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
*
|
||||
**************************************************************************
|
||||
* This file contains the parts of room object implementation
|
||||
|
@ -55,7 +55,7 @@ static void callback_chrdata(void * data, const XML_Char * s, int len)
|
|||
context_ptr->element[context_ptr->depth] == PARSE_CONTEXT_DESCRIPTION ||
|
||||
context_ptr->element[context_ptr->depth] == PARSE_CONTEXT_NOTES)
|
||||
{
|
||||
if (context_ptr->data_used + len >= sizeof(context_ptr->data))
|
||||
if ((size_t)(context_ptr->data_used + len) >= sizeof(context_ptr->data))
|
||||
{
|
||||
log_error("xml parse max char data length reached");
|
||||
context_ptr->error = XML_TRUE;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* LADI Session Handler (ladish)
|
||||
*
|
||||
* Copyright (C) 2010,2011 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
* Copyright (C) 2010,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
*
|
||||
**************************************************************************
|
||||
* This file contains implementation of the settings dialog
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
void menu_request_settings(void)
|
||||
{
|
||||
guint result;
|
||||
gint result;
|
||||
GtkDialog * dialog;
|
||||
GtkToggleButton * autostart_studio_button;
|
||||
GtkToggleButton * send_notifications_button;
|
||||
|
|
4
wscript
4
wscript
|
@ -216,6 +216,10 @@ def configure(conf):
|
|||
|
||||
conf.env['BUILD_WERROR'] = not RELEASE
|
||||
add_cflag(conf, '-Wall')
|
||||
# lash_wrap code is generated by swig and causes warnings
|
||||
if not conf.env['BUILD_PYLASH']:
|
||||
add_cflag(conf, '-Wextra')
|
||||
add_cflag(conf, '-Wno-unused-parameter')
|
||||
if conf.env['BUILD_WERROR']:
|
||||
add_cflag(conf, '-Werror')
|
||||
# for pre gcc-4.4, enable optimizations so use of uninitialized variables gets detected
|
||||
|
|
Loading…
Reference in New Issue