Silence strict-alias warning again with redefining some macros

personal/stbuehler/wip
Stefan Bühler 14 years ago
parent ecd1082378
commit dbd9218150
  1. 17
      src/base.h
  2. 2
      wscript

@ -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

@ -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' ]

Loading…
Cancel
Save