- fix warnings

SVN revision: 34490
This commit is contained in:
Dan Sinclair 2008-05-07 02:16:50 +00:00 committed by Dan Sinclair
parent e646720b97
commit 74b5878da7
5 changed files with 24 additions and 9 deletions

View File

@ -1,8 +1,9 @@
#include "Efreet.h" #include "Efreet.h"
#include <stdio.h> #include <stdio.h>
#include "ef_test.h"
static int static int
timer(void *data) timer(void *data __UNUSED__)
{ {
Ecore_List *list; Ecore_List *list;
Efreet_Desktop *desktop; Efreet_Desktop *desktop;
@ -33,7 +34,7 @@ timer(void *data)
} }
int int
main(int argc, char **argv) main(int argc __UNUSED__, char **argv __UNUSED__)
{ {
if (!efreet_init()) return 1; if (!efreet_init()) return 1;
if (!efreet_util_init()) return 1; if (!efreet_util_init()) return 1;

View File

@ -5,9 +5,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <limits.h> #include <limits.h>
#include "ef_test.h"
#define IF_FREE(x) do { if (x) free(x); x = NULL; } while (0);
#define NEW(x, c) calloc(c, sizeof(x))
static void *_cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining); static void *_cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining);
@ -327,7 +325,8 @@ ef_cb_desktop_command_get(void)
} }
static void * static void *
_cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining) _cb_command(void *data, Efreet_Desktop *desktop __UNUSED__,
char *exec, int remaining __UNUSED__)
{ {
Test_Info *info = data; Test_Info *info = data;
char *expected; char *expected;
@ -352,7 +351,7 @@ _cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
} }
static void * static void *
cb_type_parse(Efreet_Desktop *desktop, Efreet_Ini *ini) cb_type_parse(Efreet_Desktop *desktop __UNUSED__, Efreet_Ini *ini)
{ {
const char *val; const char *val;
val = efreet_ini_string_get(ini, "X-Test"); val = efreet_ini_string_get(ini, "X-Test");

View File

@ -0,0 +1,15 @@
#ifndef EF_TEST
#define EF_TEST
#include "config.h"
#if HAVE___ATTRIBUTE__
#define __UNUSED__ __attribute__((unused))
#else
#define __UNUSED__
#endif
#define IF_FREE(x) do { if (x) free(x); x = NULL; } while (0);
#define NEW(x, c) calloc(c, sizeof(x))
#endif

View File

@ -1,12 +1,13 @@
#include <Efreet.h> #include <Efreet.h>
#include <stdio.h> #include <stdio.h>
#include "ef_test.h"
#define PATH_MAX 4096 #define PATH_MAX 4096
static void dump(Efreet_Menu *menu, const char *path); static void dump(Efreet_Menu *menu, const char *path);
int int
main(int argc, char **argv) main(int argc __UNUSED__, char **argv __UNUSED__)
{ {
Efreet_Menu *menu; Efreet_Menu *menu;

View File

@ -73,7 +73,6 @@ efreet_ini_parse(const char *file)
FILE *f; FILE *f;
Ecore_Hash *data, *section = NULL; Ecore_Hash *data, *section = NULL;
struct stat file_stat; struct stat file_stat;
int buffer_length;
int line_length; int line_length;
int left; int left;