diff options
author | Haru <haru@dotalux.com> | 2016-02-20 15:59:58 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-20 15:59:58 +0100 |
commit | 71968e6985a2d6798505b84bc7ed22f5c6bfcfac (patch) | |
tree | 4740ae636d410980f379cc4bb3a969b49451c7c7 /src/map/vending.c | |
parent | 5b74faa8afd04771af7acb918072ea71a3db475f (diff) | |
parent | b7f772294594c40ef1e18f9c044e5c4fe6b490f4 (diff) | |
download | hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.gz hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.bz2 hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.xz hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.zip |
Merge pull request #1162 from 4144/flags
Add some compiler warning flags and fix new warnings
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/vending.c b/src/map/vending.c index 6e74e6c3e..2346932ba 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -119,8 +119,8 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, z = 0; // zeny counter w = 0; // weight counter for( i = 0; i < count; i++ ) { - short amount = *(uint16*)(data + 4*i + 0); - short idx = *(uint16*)(data + 4*i + 2); + short amount = *(const uint16*)(data + 4*i + 0); + short idx = *(const uint16*)(data + 4*i + 2); idx -= 2; if( amount <= 0 ) @@ -185,8 +185,8 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid, pc->getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd); for( i = 0; i < count; i++ ) { - short amount = *(uint16*)(data + 4*i + 0); - short idx = *(uint16*)(data + 4*i + 2); + short amount = *(const uint16*)(data + 4*i + 0); + short idx = *(const uint16*)(data + 4*i + 2); idx -= 2; // vending item @@ -266,9 +266,9 @@ void vending_openvending(struct map_session_data* sd, const char* message, const // filter out invalid items i = 0; for( j = 0; j < count; j++ ) { - short index = *(uint16*)(data + 8*j + 0); - short amount = *(uint16*)(data + 8*j + 2); - unsigned int value = *(uint32*)(data + 8*j + 4); + short index = *(const uint16*)(data + 8*j + 0); + short amount = *(const uint16*)(data + 8*j + 2); + unsigned int value = *(const uint32*)(data + 8*j + 4); index -= 2; // offset adjustment (client says that the first cart position is 2) |