summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-12 16:26:53 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-12 16:26:53 +0000
commitc2da0a3c7938b6461c3293b31d0e2f0db723f8d3 (patch)
treeb5f02fcb696fd2be0c21529238cc14161d814387 /src/map/map.c
parent2eb9dcd521e8c726f8731e3bdfcc2e0f2e675225 (diff)
downloadhercules-c2da0a3c7938b6461c3293b31d0e2f0db723f8d3.tar.gz
hercules-c2da0a3c7938b6461c3293b31d0e2f0db723f8d3.tar.bz2
hercules-c2da0a3c7938b6461c3293b31d0e2f0db723f8d3.tar.xz
hercules-c2da0a3c7938b6461c3293b31d0e2f0db723f8d3.zip
Fixed all warnings left from when compiling with -pedantic, confirmed with gcc, llvm and clang.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16415 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 37a8eab5d..765ec6086 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2463,21 +2463,22 @@ int map_random_dir(struct block_list *bl, short *x, short *y)
}
// gatŒn
-inline static struct mapcell map_gat2cell(int gat)
-{
- struct mapcell cell = {0};
- switch( gat )
- {
- case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground
- case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground
- case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
- case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water
- case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
- case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable)
- case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
- default:
- ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat);
- break;
+inline static struct mapcell map_gat2cell(int gat) {
+ struct mapcell cell;
+
+ memset(&cell,0,sizeof(struct mapcell));
+
+ switch( gat ) {
+ case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground
+ case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground
+ case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water
+ case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable)
+ case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ default:
+ ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat);
+ break;
}
return cell;