summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoursse <doursse>2008-04-03 19:47:07 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2008-04-03 19:47:07 +0000
commit1b73237787f417bb177a5ae41878fd805c388e5d (patch)
treed8eacc46de43297373e3086e57141d60aebeffe9
parentc088089d201eaf99ea0f032f02b35ef892a261d4 (diff)
add unsued attribute when needed
SVN revision: 34184
-rw-r--r--legacy/eet/configure.in20
-rw-r--r--legacy/eet/src/lib/eet_data.c28
2 files changed, 35 insertions, 13 deletions
diff --git a/legacy/eet/configure.in b/legacy/eet/configure.in
index 385dfe4..41136fd 100644
--- a/legacy/eet/configure.in
+++ b/legacy/eet/configure.in
@@ -28,8 +28,6 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
28version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN" 28version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
29AC_SUBST(version_info) 29AC_SUBST(version_info)
30 30
31AC_FUNC_ALLOCA
32
33WIN32_CFLAGS="" 31WIN32_CFLAGS=""
34WIN32_LIBS="" 32WIN32_LIBS=""
35create_shared_lib="" 33create_shared_lib=""
@@ -52,6 +50,24 @@ AC_SUBST(WIN32_CFLAGS)
52AC_SUBST(WIN32_LIBS) 50AC_SUBST(WIN32_LIBS)
53AC_SUBST(create_shared_lib) 51AC_SUBST(create_shared_lib)
54 52
53dnl Checking for __attribute__ support
54AC_MSG_CHECKING([for __attribute__])
55AC_CACHE_VAL(have___attribute__,
56 [
57 AC_TRY_COMPILE([#include <stdlib.h>],
58 [int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
59 [have___attribute__="yes"],
60 [have___attribute__="no"])
61 ]
62)
63
64if test "x${have___attribute__}" = "xyes" ; then
65 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
66fi
67AC_MSG_RESULT(${have___attribute__})
68
69AC_FUNC_ALLOCA
70
55AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")) 71AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
56AC_CHECK_HEADER(jpeglib.h,, AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")) 72AC_CHECK_HEADER(jpeglib.h,, AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
57 73
diff --git a/legacy/eet/src/lib/eet_data.c b/legacy/eet/src/lib/eet_data.c
index 154375a..98c5c8e 100644
--- a/legacy/eet/src/lib/eet_data.c
+++ b/legacy/eet/src/lib/eet_data.c
@@ -6,6 +6,12 @@
6# include <config.h> 6# include <config.h>
7#endif 7#endif
8 8
9#if HAVE___ATTRIBUTE__
10#define __UNUSED__ __attribute__((unused))
11#else
12#define __UNUSED__
13#endif
14
9#include <stdio.h> 15#include <stdio.h>
10#include <string.h> 16#include <string.h>
11#include <math.h> 17#include <math.h>
@@ -243,7 +249,7 @@ static int words_bigendian = -1;
243 249
244/* CHAR TYPE */ 250/* CHAR TYPE */
245static int 251static int
246eet_data_get_char(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dst) 252eet_data_get_char(const Eet_Dictionary *ed __UNUSED__, const void *src, const void *src_end, void *dst)
247{ 253{
248 char *s, *d; 254 char *s, *d;
249 255
@@ -256,7 +262,7 @@ eet_data_get_char(const Eet_Dictionary *ed, const void *src, const void *src_end
256} 262}
257 263
258static void * 264static void *
259eet_data_put_char(Eet_Dictionary *ed, const void *src, int *size_ret) 265eet_data_put_char(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret)
260{ 266{
261 char *s, *d; 267 char *s, *d;
262 268
@@ -271,7 +277,7 @@ eet_data_put_char(Eet_Dictionary *ed, const void *src, int *size_ret)
271 277
272/* SHORT TYPE */ 278/* SHORT TYPE */
273static int 279static int
274eet_data_get_short(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dst) 280eet_data_get_short(const Eet_Dictionary *ed __UNUSED__, const void *src, const void *src_end, void *dst)
275{ 281{
276 short *d; 282 short *d;
277 283
@@ -283,7 +289,7 @@ eet_data_get_short(const Eet_Dictionary *ed, const void *src, const void *src_en
283} 289}
284 290
285static void * 291static void *
286eet_data_put_short(Eet_Dictionary *ed, const void *src, int *size_ret) 292eet_data_put_short(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret)
287{ 293{
288 short *s, *d; 294 short *s, *d;
289 295
@@ -298,7 +304,7 @@ eet_data_put_short(Eet_Dictionary *ed, const void *src, int *size_ret)
298 304
299/* INT TYPE */ 305/* INT TYPE */
300static int 306static int
301eet_data_get_int(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dst) 307eet_data_get_int(const Eet_Dictionary *ed __UNUSED__, const void *src, const void *src_end, void *dst)
302{ 308{
303 int *d; 309 int *d;
304 310
@@ -310,7 +316,7 @@ eet_data_get_int(const Eet_Dictionary *ed, const void *src, const void *src_end,
310} 316}
311 317
312static void * 318static void *
313eet_data_put_int(Eet_Dictionary *ed, const void *src, int *size_ret) 319eet_data_put_int(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret)
314{ 320{
315 int *s, *d; 321 int *s, *d;
316 322
@@ -325,7 +331,7 @@ eet_data_put_int(Eet_Dictionary *ed, const void *src, int *size_ret)
325 331
326/* LONG LONG TYPE */ 332/* LONG LONG TYPE */
327static int 333static int
328eet_data_get_long_long(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dst) 334eet_data_get_long_long(const Eet_Dictionary *ed __UNUSED__, const void *src, const void *src_end, void *dst)
329{ 335{
330 unsigned long long *d; 336 unsigned long long *d;
331 337
@@ -337,7 +343,7 @@ eet_data_get_long_long(const Eet_Dictionary *ed, const void *src, const void *sr
337} 343}
338 344
339static void * 345static void *
340eet_data_put_long_long(Eet_Dictionary *ed, const void *src, int *size_ret) 346eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret)
341{ 347{
342 unsigned long long *s, *d; 348 unsigned long long *s, *d;
343 349
@@ -416,13 +422,13 @@ eet_data_put_string(Eet_Dictionary *ed, const void *src, int *size_ret)
416 422
417/* ALWAYS INLINED STRING TYPE */ 423/* ALWAYS INLINED STRING TYPE */
418static int 424static int
419eet_data_get_istring(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dst) 425eet_data_get_istring(const Eet_Dictionary *ed __UNUSED__, const void *src, const void *src_end, void *dst)
420{ 426{
421 return eet_data_get_string(NULL, src, src_end, dst); 427 return eet_data_get_string(NULL, src, src_end, dst);
422} 428}
423 429
424static void * 430static void *
425eet_data_put_istring(Eet_Dictionary *ed, const void *src, int *size_ret) 431eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, const void *src, int *size_ret)
426{ 432{
427 return eet_data_put_string(NULL, src, size_ret); 433 return eet_data_put_string(NULL, src, size_ret);
428} 434}
@@ -1222,7 +1228,7 @@ _eet_freelist_direct_str_free(Eet_Data_Descriptor *edd)
1222} 1228}
1223 1229
1224static int 1230static int
1225eet_data_descriptor_encode_hash_cb(void *hash, const char *key, void *hdata, void *fdata) 1231eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, const char *key, void *hdata, void *fdata)
1226{ 1232{
1227 Eet_Dictionary *ed; 1233 Eet_Dictionary *ed;
1228 Eet_Data_Encode_Hash_Info *edehi; 1234 Eet_Data_Encode_Hash_Info *edehi;