diff options
author | Haru <haru@dotalux.com> | 2016-10-01 00:16:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 00:16:21 +0200 |
commit | dd71362b10e5986e034ed86db08961926440ace0 (patch) | |
tree | 119c8d409657cee1d90cd0c072ef3b7e846fa3f0 /src/map/mob.c | |
parent | 84ecefb4db23bbd98194a43a592cfe313477a1ab (diff) | |
parent | 2000a698da35915afb1a598433337a735d27ae24 (diff) | |
download | hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.gz hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.bz2 hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.xz hercules-dd71362b10e5986e034ed86db08961926440ace0.zip |
Merge pull request #1450 from 4144/gcc7fixes
Add different fixes for gcc 7 warnings.
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index bede7deed..590cbf856 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1099,6 +1099,7 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) case BL_PC: if (BL_UCCAST(BL_PC, bl)->state.gangsterparadise && !(status_get_mode(&md->bl)&MD_BOSS)) return 0; //Gangster paradise protection. + FALLTHROUGH default: if (battle_config.hom_setting&0x4 && (*target) && (*target)->type == BL_HOM && bl->type != BL_HOM) @@ -1326,6 +1327,7 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) { break; //Because it is not unset when the mob finishes walking. md->state.skillstate = MSS_IDLE; + FALLTHROUGH case MSS_IDLE: // Idle skill. if (!(++md->ud.walk_count%IDLE_SKILL_INTERVAL) && mob->skill_use(md, tick, -1)) @@ -3289,6 +3291,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { bl = map->id2bl(md->master_id); if (bl) //Otherwise, fall through. break; + FALLTHROUGH case MST_FRIEND: bl = fbl?fbl:(fmd?&fmd->bl:&md->bl); break; @@ -3331,6 +3334,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { bl = map->id2bl(md->master_id); if (bl) //Otherwise, fall through. break; + FALLTHROUGH case MST_FRIEND: if (fbl) { bl = fbl; @@ -3339,6 +3343,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { bl = &fmd->bl; break; } // else fall through + FALLTHROUGH default: bl = &md->bl; break; @@ -5057,7 +5062,7 @@ void mob_readskilldb(void) { for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { if(fi > 0) { char filepath[256]; - sprintf(filepath, "%s/%s", map->db_path, filename[fi]); + snprintf(filepath, 256, "%s/%s", map->db_path, filename[fi]); if(!exists(filepath)) { continue; } |