diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-01-08 19:00:34 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-01-08 19:54:26 -0800 |
commit | f2fd4885c2a906414e0f36acf95d252e5a9d5805 (patch) | |
tree | 918bff247135e9223a5126f1b85f4ae4fc9ba1aa /src/map/magic-interpreter-base.cpp | |
parent | 3e42921c657bc93094f0c7d96855aae9b0be5a7e (diff) | |
download | tmwa-f2fd4885c2a906414e0f36acf95d252e5a9d5805.tar.gz tmwa-f2fd4885c2a906414e0f36acf95d252e5a9d5805.tar.bz2 tmwa-f2fd4885c2a906414e0f36acf95d252e5a9d5805.tar.xz tmwa-f2fd4885c2a906414e0f36acf95d252e5a9d5805.zip |
Improve warning management more
Diffstat (limited to 'src/map/magic-interpreter-base.cpp')
-rw-r--r-- | src/map/magic-interpreter-base.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/magic-interpreter-base.cpp b/src/map/magic-interpreter-base.cpp index f0fc6e9..57f6fe6 100644 --- a/src/map/magic-interpreter-base.cpp +++ b/src/map/magic-interpreter-base.cpp @@ -10,6 +10,9 @@ void set_int_p(val_t *v, int i, TY t) v->v.v_int = i; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-macros" + #define set_int(v, i) set_int_p(v, i, TY_INT) #define set_dir(v, i) set_int_p(v, i, TY_DIR) @@ -46,6 +49,8 @@ void set_spell SETTER(spell_t *, TY_SPELL, v_spell) #define set_env_invocation(v, x) setenv(set_invocation, v, x) #define set_env_spell(v, x) setenv(set_spell, v, x) +#pragma GCC diagnostic pop + magic_conf_t magic_conf; /* Global magic conf */ env_t magic_default_env = { &magic_conf, NULL }; @@ -66,8 +71,8 @@ const char *magic_find_invocation(const char *spellname) static int spell_compare(const void *lhs, const void *rhs) { - return strcmp((*((spell_t **) lhs))->invocation, - (*((spell_t **) rhs))->invocation); + return strcmp((*((const spell_t *const*) lhs))->invocation, + (*((const spell_t *const*) rhs))->invocation); } spell_t *magic_find_spell(char *invocation) @@ -103,8 +108,8 @@ spell_t *magic_find_spell(char *invocation) static int compare_teleport_anchor(const void *lhs, const void *rhs) { - return strcmp((*((teleport_anchor_t **) lhs))->invocation, - (*((teleport_anchor_t **) rhs))->invocation); + return strcmp((*((const teleport_anchor_t *const*) lhs))->invocation, + (*((const teleport_anchor_t *const*) rhs))->invocation); } const char *magic_find_anchor_invocation(const char *anchor_name) |