Make clang happy

SVN revision: 44257
This commit is contained in:
Sebastian Dransfeld 2009-12-07 21:01:26 +00:00
parent 78d547c505
commit 73cde2ffa2
17 changed files with 17 additions and 57 deletions

View File

@ -1422,16 +1422,12 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler,
flags = ECORE_EXE_PIPE_READ;
event_type = ECORE_EXE_EVENT_DATA;
child_fd = exe->child_fd_read;
if (exe->flags & ECORE_EXE_PIPE_READ_LINE_BUFFERED)
is_buffered = 1;
}
else
{
flags = ECORE_EXE_PIPE_ERROR;
event_type = ECORE_EXE_EVENT_ERROR;
child_fd = exe->child_fd_error;
if (exe->flags & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED)
is_buffered = 1;
}
if ((fd_handler)

View File

@ -557,10 +557,10 @@ _ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc)
switch (desc->action)
{
case ECORE_GETOPT_ACTION_STORE:
used = _ecore_getopt_help_desc_store(fp, helpcol, cols, used, desc);
_ecore_getopt_help_desc_store(fp, helpcol, cols, used, desc);
break;
case ECORE_GETOPT_ACTION_CHOICE:
used = _ecore_getopt_help_desc_choices(fp, helpcol, cols, used, desc);
_ecore_getopt_help_desc_choices(fp, helpcol, cols, used, desc);
break;
default:
break;
@ -746,7 +746,6 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
base = dst;
if (src != dst)
argv[dst] = argv[src];
src++;
dst++;
}

View File

@ -662,7 +662,6 @@ _ecore_main_loop_iterate_internal(int once_only)
if (_ecore_event_exist())
{
have_event = 1;
have_signal = 1;
_ecore_main_select(0.0);
goto process_events;
}
@ -688,7 +687,6 @@ _ecore_main_loop_iterate_internal(int once_only)
if (_ecore_event_exist())
{
have_event = 1;
have_signal = 1;
_ecore_main_select(0.0);
goto process_events;
}
@ -725,7 +723,6 @@ _ecore_main_loop_iterate_internal(int once_only)
if (!_ecore_idler_exist())
{
if (_ecore_main_select(-1.0) > 0) have_event = 1;
if (_ecore_signal_count_get() > 0) have_signal = 1;
}
/* idlers */
else
@ -751,7 +748,6 @@ _ecore_main_loop_iterate_internal(int once_only)
if (!_ecore_idler_exist())
{
if (_ecore_main_select(next_time) > 0) have_event = 1;
if (_ecore_signal_count_get() > 0) have_signal = 1;
}
/* idlers */
else

View File

@ -650,9 +650,7 @@ tree_node_find_parent(Ecore_Tree *tree, const void *key)
while (!parent)
{
int compare;
if ((compare = tree->compare_func(key, travel->key)) < 0)
if (tree->compare_func(key, travel->key) < 0)
{
if (!travel->right_child)
parent = travel;

View File

@ -449,7 +449,6 @@ ecore_config_type_guess(const char *key, const char *val)
{
Ecore_Config_Prop *p;
char *l;
long v;
l = NULL;
@ -460,7 +459,7 @@ ecore_config_type_guess(const char *key, const char *val)
return ECORE_CONFIG_NIL;
if (val[0] == '#')
return ECORE_CONFIG_RGB;
v = strtol(val, &l, 10);
strtol(val, &l, 10);
if (*l)
{
float f;
@ -1639,7 +1638,6 @@ ecore_config_init_global(const char *name)
char *p;
int global;
char *buf;
global = 0;
if ((p = getenv("HOME")))
{ /* debug-only ### FIXME */

View File

@ -122,7 +122,6 @@ _ecore_config_db_read(Ecore_Config_DB_File *db, const char *key)
{
char *data, *value;
int size;
Ecore_Config_Prop *prop;
Ecore_Config_Type type;
data = eet_read(db->ef, (char*)key, &size);
@ -151,8 +150,7 @@ _ecore_config_db_read(Ecore_Config_DB_File *db, const char *key)
type = data[0];
value = data + l + 1;
prop = ecore_config_get(key);
switch (type)
{
case ECORE_CONFIG_INT:

View File

@ -158,7 +158,6 @@ _ecore_config_ipc_ecore_handle_request(Ecore_Ipc_Server * server,
srv = _ecore_config_server_convert(server);
serial = e->minor;
ret = ECORE_CONFIG_ERR_FAIL;
r = NULL;
m = (char *)e->data;
E(1, "IPC/eCore: client sent: [%d,%d] #%d (%d) @ %p\n", e->major, e->minor,

View File

@ -93,12 +93,9 @@ _ecore_config_ipc_prop_desc(Ecore_Config_Server * srv, const long serial,
const char *key)
{
#ifdef HAVE_EVAS2
Ecore_Config_Bundle *theme;
Ecore_Config_Prop *e;
theme = ecore_config_bundle_by_serial_get(srv, serial);
e = ecore_config_get(key);
if (e)
{
estring *s = estring_new(512);
@ -118,11 +115,8 @@ _ecore_config_ipc_prop_get(Ecore_Config_Server * srv, const long serial,
{
#ifdef HAVE_EVAS2
char *ret;
Ecore_Config_Bundle *theme;
ret = NULL;
theme = ecore_config_bundle_by_serial_get(srv, serial);
if ((ret = ecore_config_as_string_get( /*theme, */ key)))
if ((ret = ecore_config_as_string_get(key)))
return ret;
#endif
return strdup("<undefined>");

View File

@ -3038,9 +3038,6 @@ ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent,
if (einfo)
{
int screen;
screen = DefaultScreen(ecore_x_display_get());
if (ScreenCount(ecore_x_display_get()) > 1)
{
Ecore_X_Window *roots;
@ -3058,10 +3055,7 @@ ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent,
for (i = 0; i < num; i++)
{
if (at.root == roots[i])
{
screen = i;
break;
}
break;
}
}
free(roots);

View File

@ -209,10 +209,8 @@ static void
_ecore_file_monitor_poll_check(Ecore_File_Monitor *em)
{
int mtime;
int is_dir;
mtime = ecore_file_mod_time(em->path);
is_dir = ecore_file_is_dir(em->path);
if (mtime < ECORE_FILE_MONITOR_POLL(em)->mtime)
{
Ecore_File *l;

View File

@ -284,7 +284,7 @@ ecore_ipc_init(void)
_ecore_ipc_event_server_del, NULL);
handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA,
_ecore_ipc_event_client_data, NULL);
handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
handler[i] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
_ecore_ipc_event_server_data, NULL);
return _ecore_ipc_init_count;
}

View File

@ -37,7 +37,6 @@ ecore_txt_convert(const char *enc_from, const char *enc_to, const char *text)
outp = new_txt;
outalloc = 64;
outlen = 0;
tob = 0;
for (;;)
{

View File

@ -35,7 +35,7 @@ EAPI void
ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update;
int update = CompositeRedirectAutomatic;
switch(type)
{
@ -54,7 +54,7 @@ EAPI void
ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update;
int update = CompositeRedirectAutomatic;
switch(type)
{
@ -73,7 +73,7 @@ EAPI void
ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update;
int update = CompositeRedirectAutomatic;
switch(type)
{
@ -92,7 +92,7 @@ EAPI void
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update;
int update = CompositeRedirectAutomatic;
switch(type)
{

View File

@ -1410,7 +1410,6 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
{
Ecore_X_Event_Xdnd_Enter *e;
Ecore_X_DND_Target *target;
unsigned long three;
e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Enter));
if (!e) return;
@ -1427,7 +1426,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
return;
}
if ((three = xevent->xclient.data.l[1] & 0x1UL))
if (xevent->xclient.data.l[1] & 0x1UL)
{
/* source supports more than 3 types, fetch property */
unsigned char *data;

View File

@ -1145,7 +1145,7 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsi
}
int
_ecore_x_netwm_startup_info_begin(Ecore_X_Window win, char *data)
_ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, char *data __UNUSED__)
{
#if 0
Ecore_X_Startup_Info *info;
@ -1182,15 +1182,12 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win, char *data)
/* We have a '\0' in there, the message is done */
_ecore_x_netwm_startup_info_process(info);
}
#else
win = 0;
data = NULL;
#endif
return 1;
}
int
_ecore_x_netwm_startup_info(Ecore_X_Window win, char *data)
_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, char *data __UNUSED__)
{
#if 0
Ecore_X_Startup_Info *info;
@ -1219,9 +1216,6 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win, char *data)
/* We have a '\0' in there, the message is done */
_ecore_x_netwm_startup_info_process(info);
}
#else
win = 0;
data = NULL;
#endif
return 1;
}

View File

@ -85,9 +85,9 @@ EAPI Ecore_X_Randr_Rotation
ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
{
#ifdef ECORE_XRANDR
Rotation rot, crot = 0;
Rotation crot = 0;
rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
return crot;
#else
return 0;

View File

@ -144,7 +144,5 @@ ecore_x_screensaver_event_listen_set(int on)
XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
else
XScreenSaverSelectInput(_ecore_x_disp, root, 0);
#else
on = 0;
#endif
}