diff options
author | Haru <haru@dotalux.com> | 2013-12-10 19:48:55 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-12-17 01:11:33 +0100 |
commit | 15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48 (patch) | |
tree | c5dd5b25003f8c21381c7a2e1f010dba71e40b90 /src/map/script.h | |
parent | a23d072a66d2569ba13921522be3c82ae9aad576 (diff) | |
download | hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.gz hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.bz2 hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.xz hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.zip |
Fixed several compiler warnings
- Warnings detected thanks to Xcode's compiler settings (more strict by
default) and clang, warnings mostly but not only related to data sizes
on 64 bit systems, that were silenced until now by very lax compiler
settings.
- This also decreases by a great deal the amount of warnings produced by
MSVC in x64 mode (for the adventurous ones who tried that)
- Also fixed (or silenced in case of false positives) the potential
issues pointed out by the (awesome) clang static analyzer.
- Patch co-produced with Ind, I'm merging and committing in his place!
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.h')
-rw-r--r-- | src/map/script.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/script.h b/src/map/script.h index d1d131af3..8076ea02e 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -480,12 +480,12 @@ struct script_interface { int str_num; // next id to be assigned // str_buf holds the strings themselves char *str_buf; - int str_size; // size of the buffer + size_t str_size; // size of the buffer int str_pos; // next position to be assigned int str_hash[SCRIPT_HASH_SIZE]; /* */ char *word_buf; - int word_size; + size_t word_size; /* */ unsigned short current_item_id; /* */ @@ -594,7 +594,6 @@ struct script_interface { void (*reportsrc) (struct script_state *st); void (*reportdata) (struct script_data *data); void (*reportfunc) (struct script_state *st); - void (*disp_error_message2) (const char *mes, const char *pos, int report); void (*disp_warning_message) (const char *mes, const char *pos); void (*check_event) (struct script_state *st, const char *evt); unsigned int (*calc_hash) (const char *p); |