diff options
author | Darkvater <darkvater@openttd.org> | 2006-02-20 22:57:32 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-02-20 22:57:32 +0000 |
commit | 8104a720b9ca713b5492dabe48fadde38d417566 (patch) | |
tree | 481728bd3a197df3044b179000978a42ccc6b49f /saveload.h | |
parent | a66e4c7e6cf8823418ff299a1b2d060a5491476c (diff) | |
download | openttd-8104a720b9ca713b5492dabe48fadde38d417566.tar.xz |
(svn r3639) Silence warnings on gcc about {} initializers around unions
Diffstat (limited to 'saveload.h')
-rw-r--r-- | saveload.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/saveload.h b/saveload.h index 2f9c28b5c..a76f41ef9 100644 --- a/saveload.h +++ b/saveload.h @@ -159,7 +159,7 @@ typedef struct SaveLoad { typedef SaveLoad SaveLoadGlobVarList; /* Simple variables, references (pointers) and arrays */ -#define SLE_GENERAL(cmd, base, variable, type, length, from, to) {cmd, type, length, from, to, (void*)offsetof(base, variable)} +#define SLE_GENERAL(cmd, base, variable, type, length, from, to) {cmd, type, length, from, to, {(void*)offsetof(base, variable)}} #define SLE_CONDVAR(base, variable, type, from, to) SLE_GENERAL(SL_VAR, base, variable, type, 0, from, to) #define SLE_CONDREF(base, variable, type, from, to) SLE_GENERAL(SL_REF, base, variable, type, 0, from, to) #define SLE_CONDARR(base, variable, type, length, from, to) SLE_GENERAL(SL_ARR, base, variable, type, length, from, to) @@ -176,7 +176,7 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLE_INCLUDE(base, variable, include_index) SLE_GENERAL(SL_INCLUDE, base, variable, 0, 0, include_index, 0) /* The same as the ones at the top, only the offset is given directly; used for unions */ -#define SLE_GENERALX(cmd, offset, type, param1, param2) {cmd, type, 0, param1, param2, (void*)(offset)} +#define SLE_GENERALX(cmd, offset, type, param1, param2) {cmd, type, 0, param1, param2, {(void*)(offset)}} #define SLE_CONDVARX(offset, type, from, to) SLE_GENERALX(SL_VAR, offset, type, from, to) #define SLE_CONDREFX(offset, type, from, to) SLE_GENERALX(SL_REF, offset, type, from, to) @@ -187,10 +187,10 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLE_INCLUDEX(offset, type) SLE_GENERALX(SL_INCLUDE, offset, type, 0, SL_MAX_VERSION) /* End marker */ -#define SLE_END() {SL_END, 0, 0, 0, 0, (void*)0} +#define SLE_END() {SL_END, 0, 0, 0, 0, {(void*)0}} /* Simple variables, references (pointers) and arrays, but for global variables */ -#define SLEG_GENERAL(cmd, variable, type, length, from, to) {cmd, type, length, from, to, &variable} +#define SLEG_GENERAL(cmd, variable, type, length, from, to) {cmd, type, length, from, to, {&variable}} #define SLEG_CONDVAR(variable, type, from, to) SLEG_GENERAL(SL_VAR, variable, type, 0, from, to) #define SLEG_CONDREF(variable, type, from, to) SLEG_GENERAL(SL_REF, variable, type, 0, from, to) @@ -202,7 +202,7 @@ typedef SaveLoad SaveLoadGlobVarList; #define SLEG_ARR(variable, type) SLEG_CONDARR(variable, type, lengthof(variable), SL_MAX_VERSION) #define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, lengthof(variable), SL_MAX_VERSION) -#define SLEG_END() {SL_END, 0, 0, 0, 0, NULL} +#define SLEG_END() {SL_END, 0, 0, 0, 0, {NULL}} /** Checks if the savegame is below major.minor. */ |