2
0
Fork 0

Silence strict-alias warning again with redefining some macros

personal/stbuehler/wip
Stefan Bühler 2008-09-07 15:33:11 +02:00
parent ecd1082378
commit dbd9218150
2 changed files with 18 additions and 1 deletions

View File

@ -3,6 +3,23 @@
#include "settings.h"
/* Next try to fix strict-alias warning */
#undef ev_init
#define ev_init(ev,cb_) do { \
ev_watcher *ew = (ev_watcher *)(void *)ev; \
(ew)->active = \
(ew)->pending = \
(ew)->priority = 0; \
ev_set_cb ((ev), cb_); \
} while (0)
#undef ev_timer_set
#define ev_timer_set(ev,after_,repeat_) do { \
ev_watcher_time *ew = (ev_watcher_time *)(ev); \
ew->at = (after_); \
(ev)->repeat = (repeat_); \
} while (0)
#define CONST_STR_LEN(x) (x), (x) ? sizeof(x) - 1 : 0
#define GSTR_LEN(x) (x) ? (x)->str : "", (x) ? (x)->len : 0

View File

@ -229,7 +229,7 @@ def configure(conf):
'-fPIC',
'-DHAVE_CONFIG_H', '-D_GNU_SOURCE',
'-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-D_LARGE_FILES',
'-fno-strict-aliasing',
# '-fno-strict-aliasing',
]
conf.env['CCFLAGS'] = tolist(conf.env['CCFLAGS']) + common_ccflags
conf.env['CCFLAGS_lighty'] += lighty_common_ccflags + [ '-DLI_DECLARE_EXPORTS' ]