remove -Wextra warnings.

SVN revision: 41370
This commit is contained in:
Gustavo Sverzut Barbieri 2009-07-16 21:49:14 +00:00
parent 4a2bd500e3
commit 473f5ea563
4 changed files with 52 additions and 4 deletions

View File

@ -14,6 +14,7 @@ AC_PROG_CC
AM_PROG_CC_STDC
AM_PROG_CC_C_O
AC_HEADER_STDC
AC_C___ATTRIBUTE__
dnl AC_C_CONST is bogus, its tests fails on -Wall -O1 ( uninitialized values)
dnl AC_C_CONST

View File

@ -0,0 +1,47 @@
dnl Copyright (C) 2004-2008 Kim Woelders
dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
dnl That code is public domain and can be freely used or copied.
dnl Originally snatched from somewhere...
dnl Macro for checking if the compiler supports __attribute__
dnl Usage: AC_C___ATTRIBUTE__
dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__
dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is
dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused))
dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is
dnl defined to nothing.
AC_DEFUN([AC_C___ATTRIBUTE__],
[
AC_MSG_CHECKING([for __attribute__])
AC_CACHE_VAL([ac_cv___attribute__],
[AC_TRY_COMPILE(
[
#include <stdlib.h>
int func(int x);
int foo(int x __attribute__ ((unused)))
{
exit(1);
}
],
[],
[ac_cv___attribute__="yes"],
[ac_cv___attribute__="no"]
)])
AC_MSG_RESULT($ac_cv___attribute__)
if test "x${ac_cv___attribute__}" = "xyes" ; then
AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__])
AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused])
else
AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused])
fi
])
dnl End of ac_attribute.m4

View File

@ -67,7 +67,7 @@ static Eina_Hash *_plugins_ext = NULL;
static Eina_Array *_plugins = NULL;
static Eina_Bool
_ethumb_plugin_list_cb(Eina_Module *m, void *data)
_ethumb_plugin_list_cb(Eina_Module *m, void *data __UNUSED__)
{
const char *file;
const char **ext;
@ -719,7 +719,7 @@ _ethumb_generate_hash(const char *file)
char *uri;
char *t;
const char *c;
const unsigned char *c;
#define _check_uri_char(c) \
((c) >= 32 && (c) < 128 && (ACCEPTABLE_URI_CHARS[(c) - 32] & 0x08))
@ -730,7 +730,7 @@ _ethumb_generate_hash(const char *file)
strncpy(uri, "file://", sizeof(uri));
t = uri + 7;
for (c = file; *c != '\0'; c++)
for (c = (const unsigned char *)file; *c != '\0'; c++)
{
if (!_check_uri_char(*c))
{

View File

@ -980,7 +980,7 @@ end:
}
static void
_ethumb_client_queue_clear_cb(void *data, DBusMessage *msg, DBusError *error)
_ethumb_client_queue_clear_cb(void *data, DBusMessage *msg __UNUSED__, DBusError *error __UNUSED__)
{
Ethumb_Client *client = data;