Fix most compiler & clang warnings.

Left warnings regarding signed and unsigned comparison since
eina_list_count() returns unsigned, can use a cast in this return, but
not big deal for now.


By: Luis Felipe Strano Moraes & myself.



SVN revision: 39260
This commit is contained in:
Gustavo Sverzut Barbieri 2009-02-26 22:35:38 +00:00
parent b95c69d2f5
commit ab2e35127f
8 changed files with 17 additions and 82 deletions

View File

@ -4,7 +4,7 @@
#include "comp.h"
int
main(int argc, char **argv)
main(void)
{
int i = 0, k;
char *path;

View File

@ -3,7 +3,7 @@
#include "comp.h"
int
main(int argc, char **argv)
main(void)
{
int k;

View File

@ -54,7 +54,7 @@ ef_cb_efreet_icon_theme(void)
}
static Eina_Bool
_hash_keys(Eina_Hash *hash, const char *key, void *list)
_hash_keys(Eina_Hash *hash __UNUSED__, const char *key, void *list)
{
Eina_List **l = list;
@ -74,7 +74,6 @@ ef_cb_efreet_icon_theme_list(void)
Efreet_Icon_Theme *theme;
const char *dir;
char buf[PATH_MAX];
void *value;
dirs = eina_hash_string_superfast_new(free);

View File

@ -1009,17 +1009,18 @@ efreet_desktop_generic_fields_save(Efreet_Desktop *desktop, Efreet_Ini *ini)
* @internal
* @param node: The node to work with
* @param desktop: The desktop file to work with
* @return Returns no value
* @return Returns always true, to be used in eina_hash_foreach()
* @brief Parses out an X- key from @a node and stores in @a desktop
*/
static Eina_Bool
efreet_desktop_x_fields_parse(const Eina_Hash *hash, const void *key, void *value, void *fdata)
efreet_desktop_x_fields_parse(const Eina_Hash *hash __UNUSED__, const void *key, void *value, void *fdata)
{
Efreet_Desktop * desktop = fdata;
if (!desktop) return EINA_TRUE;
if (strncmp(key, "X-", 2)) return EINA_TRUE;
if (desktop && !desktop->x)
if (!desktop->x)
desktop->x = eina_hash_string_superfast_new(EINA_FREE_CB(eina_stringshare_del));
eina_hash_del(desktop->x, key, NULL);
eina_hash_add(desktop->x, key, (void *)eina_stringshare_add(value));
@ -1035,7 +1036,7 @@ efreet_desktop_x_fields_parse(const Eina_Hash *hash, const void *key, void *valu
* @brief Stores an X- key from @a node and stores in @a ini
*/
static Eina_Bool
efreet_desktop_x_fields_save(const Eina_Hash *hash, const void *key, void *value, void *fdata)
efreet_desktop_x_fields_save(const Eina_Hash *hash __UNUSED__, const void *key, void *value, void *fdata)
{
Efreet_Ini *ini = fdata;
efreet_ini_string_set(ini, key, value);

View File

@ -48,7 +48,6 @@ static int efreet_icon_directory_size_match(Efreet_Icon_Theme_Directory *dir,
unsigned int size);
static Efreet_Icon *efreet_icon_new(const char *path);
static void efreet_icon_point_free(Efreet_Icon_Point *point);
static void efreet_icon_populate(Efreet_Icon *icon, const char *file);
static char *efreet_icon_lookup_directory_helper(Efreet_Icon_Theme_Directory *dir,
@ -67,7 +66,6 @@ static void efreet_icon_theme_index_read(Efreet_Icon_Theme *theme,
static Efreet_Icon_Theme_Directory *efreet_icon_theme_directory_new(Efreet_Ini *ini,
const char *name);
static void efreet_icon_theme_directory_free(Efreet_Icon_Theme_Directory *dir);
static void efreet_icon_theme_cache_check(Efreet_Icon_Theme *theme);
static int efreet_icon_theme_cache_check_dir(Efreet_Icon_Theme *theme,
@ -211,7 +209,7 @@ efreet_icon_extra_list_get(void)
}
static Eina_Bool
_hash_keys(Eina_Hash *hash, const void *key, void *list)
_hash_keys(Eina_Hash *hash __UNUSED__, const void *key, void *list)
{
*(Eina_List**)list = eina_list_append(*(Eina_List**)list, key);
return EINA_TRUE;
@ -354,13 +352,14 @@ efreet_icon_find_theme_check(const char *theme_name)
EAPI char *
efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int size)
{
char *value = NULL;
const char *cached;
char *value;
Efreet_Icon_Theme *theme;
if ((value = efreet_icon_hash_get(theme_name, icon, size)) != NULL)
if ((cached = efreet_icon_hash_get(theme_name, icon, size)) != NULL)
{
if (value == NON_EXISTING) return NULL;
return strdup(value);
if (cached == NON_EXISTING) return NULL;
return strdup(cached);
}
theme = efreet_icon_find_theme_check(theme_name);
@ -986,20 +985,6 @@ efreet_icon_free(Efreet_Icon *icon)
FREE(icon);
}
/**
* @internal
* @param point: The Efreet_Icon_Point to free
* @return Returns no value
* @brief Frees the given structure
*/
static void
efreet_icon_point_free(Efreet_Icon_Point *point)
{
if (!point) return;
FREE(point);
}
/**
* @internal
* @param icon: The icon to populate
@ -1505,21 +1490,6 @@ efreet_icon_theme_directory_new(Efreet_Ini *ini, const char *name)
return dir;
}
/**
* @internal
* @param dir: The Efreet_Icon_Theme_Directory to free
* @return Returns no value
* @brief Frees the given directory @a dir
*/
static void
efreet_icon_theme_directory_free(Efreet_Icon_Theme_Directory *dir)
{
if (!dir) return;
IF_FREE(dir->name);
FREE(dir);
}
static int
efreet_icon_cache_find(Efreet_Icon_Cache *value, const char *key)
{

View File

@ -623,7 +623,7 @@ efreet_ini_unescape(const char *str)
}
static Eina_Bool
efreet_ini_section_save(const Eina_Hash *hash, const void *key, void *value, void *fdata)
efreet_ini_section_save(const Eina_Hash *hash __UNUSED__, const void *key, void *value, void *fdata)
{
FILE *f = fdata;
@ -633,7 +633,7 @@ efreet_ini_section_save(const Eina_Hash *hash, const void *key, void *value, voi
}
static Eina_Bool
efreet_ini_value_save(const Eina_Hash *hash, const void *key, void *value, void *fdata)
efreet_ini_value_save(const Eina_Hash *hash __UNUSED__, const void *key, void *value, void *fdata)
{
FILE *f = fdata;

View File

@ -280,7 +280,6 @@ static void efreet_menu_create_default_layout_list(Efreet_Menu_Internal *interna
static char *efreet_menu_path_get(Efreet_Menu_Internal *internal, const char *suffix);
static Efreet_Menu_App_Dir *efreet_menu_app_dir_new(void);
static void efreet_menu_app_dir_free(Efreet_Menu_App_Dir *dir);
static Efreet_Menu_Move *efreet_menu_move_new(void);
static void efreet_menu_move_free(Efreet_Menu_Move *move);
@ -289,7 +288,6 @@ static Efreet_Menu_Filter *efreet_menu_filter_new(void);
static void efreet_menu_filter_free(Efreet_Menu_Filter *filter);
static Efreet_Menu_Layout *efreet_menu_layout_new(void);
static void efreet_menu_layout_free(Efreet_Menu_Layout *layout);
static Efreet_Menu_Filter_Op *efreet_menu_filter_op_new(void);
static void efreet_menu_filter_op_free(Efreet_Menu_Filter_Op *op);
@ -2427,22 +2425,6 @@ efreet_menu_layout_new(void)
return layout;
}
/**
* @internal
* @param layout: The layout to work with
* @return Returns no data
* @brief Frees the given layout and all data
*/
static void
efreet_menu_layout_free(Efreet_Menu_Layout *layout)
{
if (!layout) return;
IF_FREE(layout->name);
FREE(layout);
}
/**
* @internal
* @return Returns a new Efreet_Menu_Filter_Op on success or NULL on failure
@ -3216,23 +3198,6 @@ efreet_menu_app_dir_new(void)
return dir;
}
/**
* @internal
* @param dir: The app dir to free
* @return Returns no value
* @brief Frees @a dir
*/
static void
efreet_menu_app_dir_free(Efreet_Menu_App_Dir *dir)
{
if (!dir) return;
IF_FREE(dir->path);
IF_FREE(dir->prefix);
FREE(dir);
}
/**
* @internal
* @param a: The app dir to compare too

View File

@ -480,7 +480,7 @@ efreet_util_desktop_comment_glob_list(const char *glob)
}
static Eina_Bool
_hash_keys(Eina_Hash *hash, const void *key, void *fdata)
_hash_keys(Eina_Hash *hash __UNUSED__, const void *key, void *fdata)
{
Eina_List **l = fdata;