summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/map.c31
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c2
5 files changed, 22 insertions, 21 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;
diff --git a/src/map/mob.c b/src/map/mob.c
index c59febd42..0516295cc 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1793,7 +1793,7 @@ static struct item_drop* mob_setdropitem(int nameid, int qty)
drop->item_data.identify = itemdb_isidentified(nameid);
drop->next = NULL;
return drop;
-};
+}
/*==========================================
* Initializes the delay drop structure for mob-looted items.
@@ -1804,7 +1804,7 @@ static struct item_drop* mob_setlootitem(struct item* item)
memcpy(&drop->item_data, item, sizeof(struct item));
drop->next = NULL;
return drop;
-};
+}
/*==========================================
* item drop with delay (timer function)
diff --git a/src/map/pc.c b/src/map/pc.c
index 27e54b344..215086532 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5575,12 +5575,12 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
unsigned int pc_maxbaselv(struct map_session_data *sd)
{
return max_level[pc_class2idx(sd->status.class_)][0];
-};
+}
unsigned int pc_maxjoblv(struct map_session_data *sd)
{
return max_level[pc_class2idx(sd->status.class_)][1];
-};
+}
/*==========================================
* base level‘¤•K—v??’lŒvŽZ
diff --git a/src/map/pc.h b/src/map/pc.h
index c5f1aaa02..6352d362c 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -110,7 +110,7 @@ struct map_session_data {
unsigned int abra_flag : 2; // Abracadabra bugfix by Aru
unsigned int autocast : 1; // Autospell flag [Inkfish]
unsigned int autotrade : 1; //By Fantik
- unsigned int reg_dirty : 3; //By Skotlex (marks whether registry variables have been saved or not yet)
+ unsigned int reg_dirty : 4; //By Skotlex (marks whether registry variables have been saved or not yet)
unsigned int showdelay :1;
unsigned int showexp :1;
unsigned int showzeny :1;
diff --git a/src/map/skill.c b/src/map/skill.c
index 98bb181a3..c2c4f23de 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -268,7 +268,7 @@ int skill_get_casttype (int id)
if (skill_get_nk(id)&NK_NO_DAMAGE)
return CAST_NODAMAGE;
return CAST_DAMAGE;
-};
+}
//Returns actual skill range taking into account attack range and AC_OWL [Skotlex]
int skill_get_range2 (struct block_list *bl, int id, int lv)