True warning fix

This commit is contained in:
Zeex 2015-04-07 19:07:48 +06:00
parent c0cb31de01
commit 05fb325dd1
2 changed files with 10 additions and 38 deletions

View File

@ -204,14 +204,6 @@ typedef int (AMXAPI *AMX_IDLE)(struct tagAMX *amx, int AMXAPI Exec(struct tagAMX
#define AMX_NO_ALIGN
#endif
#if defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#elif defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-attributes"
#endif
#if defined __GNUC__
#define PACKED __attribute__((packed))
#else
@ -233,7 +225,7 @@ typedef int (AMXAPI *AMX_IDLE)(struct tagAMX *amx, int AMXAPI Exec(struct tagAMX
#endif
typedef struct tagAMX_NATIVE_INFO {
const char _FAR *name PACKED;
const char _FAR *name;
AMX_NATIVE func PACKED;
} AMX_NATIVE_INFO;
@ -469,12 +461,6 @@ int AMXAPI amx_UTF8Put(char *string, char **endptr, int maxchars, cell value);
#endif
#endif
#if defined __GNUC__
#pragma GCC diagnostic pop
#elif defined __clang__
#pragma clang diagnostic pop
#endif
#ifdef __cplusplus
}
#endif

View File

@ -42,14 +42,6 @@ extern "C" {
#define AMX_NO_ALIGN
#endif
#if defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#elif defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-attributes"
#endif
#if defined __GNUC__
#define PACKED __attribute__((packed))
#else
@ -73,8 +65,8 @@ extern "C" {
typedef struct tagAMX_DBG_HDR {
int32_t size PACKED; /* size of the debug information chunk */
uint16_t magic PACKED; /* signature, must be 0xf1ef */
char file_version PACKED; /* file format version */
char amx_version PACKED; /* required version of the AMX */
char file_version; /* file format version */
char amx_version; /* required version of the AMX */
int16_t flags PACKED; /* currently unused */
int16_t files PACKED; /* number of entries in the "file" table */
int16_t lines PACKED; /* number of entries in the "line" table */
@ -87,7 +79,7 @@ typedef struct tagAMX_DBG_HDR {
typedef struct tagAMX_DBG_FILE {
ucell address PACKED; /* address in the code segment where generated code (for this file) starts */
const char name[1] PACKED; /* ASCII string, zero-terminated */
const char name[1]; /* ASCII string, zero-terminated */
} PACKED AMX_DBG_FILE;
typedef struct tagAMX_DBG_LINE {
@ -100,10 +92,10 @@ typedef struct tagAMX_DBG_SYMBOL {
int16_t tag PACKED; /* tag for the symbol */
ucell codestart PACKED; /* address in the code segment from which this symbol is valid (in scope) */
ucell codeend PACKED; /* address in the code segment until which this symbol is valid (in scope) */
char ident PACKED; /* kind of symbol (function/variable) */
char vclass PACKED; /* class of symbol (global/local) */
char ident; /* kind of symbol (function/variable) */
char vclass; /* class of symbol (global/local) */
int16_t dim PACKED; /* number of dimensions */
const char name[1] PACKED; /* ASCII string, zero-terminated */
const char name[1]; /* ASCII string, zero-terminated */
} PACKED AMX_DBG_SYMBOL;
typedef struct tagAMX_DBG_SYMDIM {
@ -113,19 +105,19 @@ typedef struct tagAMX_DBG_SYMDIM {
typedef struct tagAMX_DBG_TAG {
int16_t tag PACKED; /* tag id */
const char name[1] PACKED; /* ASCII string, zero-terminated */
const char name[1]; /* ASCII string, zero-terminated */
} PACKED AMX_DBG_TAG;
typedef struct tagAMX_DBG_MACHINE {
int16_t automaton PACKED; /* automaton id */
ucell address PACKED; /* address of state variable */
const char name[1] PACKED; /* ASCII string, zero-terminated */
const char name[1]; /* ASCII string, zero-terminated */
} PACKED AMX_DBG_MACHINE;
typedef struct tagAMX_DBG_STATE {
int16_t state PACKED; /* state id */
int16_t automaton PACKED; /* automaton id */
const char name[1] PACKED; /* ASCII string, zero-terminated */
const char name[1]; /* ASCII string, zero-terminated */
} PACKED AMX_DBG_STATE;
typedef struct tagAMX_DBG {
@ -172,12 +164,6 @@ int AMXAPI dbg_GetArrayDim(AMX_DBG *amxdbg, const AMX_DBG_SYMBOL *sym, const AMX
#endif
#endif
#if defined __GNUC__
#pragma GCC diagnostic pop
#elif defined __clang__
#pragma clang diagnostic pop
#endif
#ifdef __cplusplus
}
#endif