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/tool | |
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/tool')
-rw-r--r-- | src/tool/Makefile.in | 4 | ||||
-rw-r--r-- | src/tool/mapcache.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in index 307aa6d2c..3d0de1122 100644 --- a/src/tool/Makefile.in +++ b/src/tool/Makefile.in @@ -4,9 +4,9 @@ CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h) COMMON_D = ../common COMMON_OBJ = $(addprefix $(COMMON_D)/obj_all/, des.o grfio.o malloc.o \ - miniconsole.o minicore.o showmsg.o strlib.o utils.o) + nullpo.o miniconsole.o minicore.o showmsg.o strlib.o utils.o) COMMON_H = $(addprefix $(COMMON_D)/, cbasetypes.h console.h core.h des.h \ - grfio.h malloc.h mmo.h showmsg.h strlib.h utils.h) + grfio.h malloc.h mmo.h nullpo.h showmsg.h strlib.h utils.h) LIBCONFIG_D = ../../3rdparty/libconfig LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \ diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 49f948709..caa55c87a 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -181,7 +181,7 @@ void cache_map(char *name, struct map_data *m) strncpy(info.name, name, MAP_NAME_LENGTH); info.xs = MakeShortLE(m->xs); info.ys = MakeShortLE(m->ys); - info.len = MakeLongLE(len); + info.len = MakeLongLE((uint32)len); // Append map header then compressed cells at the end of the file fseek(map_cache_fp, header.file_size, SEEK_SET); |