Browse Source

Resolved some compile warnings
* Resolved two unreachable code warnings.
* Resolved two potentially uninitialized local variable warnings.

aleos89 8 years ago
parent
commit
9910478ce2
3 changed files with 2 additions and 5 deletions
  1. 0 1
      src/map/atcommand.c
  2. 2 2
      src/map/script.c
  3. 0 2
      src/map/skill.c

+ 0 - 1
src/map/atcommand.c

@@ -3478,7 +3478,6 @@ ACMD_FUNC(breakguild)
 		clif_displaymessage(fd, msg_txt(sd,252)); // You are not in a guild.
 		return -1;
 	}
-	return 0;
 }
 
 /**

+ 2 - 2
src/map/script.c

@@ -20378,9 +20378,9 @@ BUILDIN_FUNC(party_create)
 {
 	char party_name[NAME_LENGTH];
 	int item1 = 0, item2 = 0;
-	TBL_PC *sd;
+	TBL_PC *sd = NULL;
 
-	if( (!script_hasdata(st,3) && !(sd = script_rid2sd(st))) || (script_hasdata(st,3) && !(sd = map_charid2sd(script_getnum(st,3)))) ) {
+	if (!script_charid2sd(3, sd)) {
 		script_pushint(st,-1);
 		return SCRIPT_CMD_FAILURE;
 	}

+ 0 - 2
src/map/skill.c

@@ -14424,8 +14424,6 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
 					{
 						p_sd[(*c)++]=tsd->bl.id;
 						return skill_lv;
-					} else {
-						return 0;
 					}
 				}
 				break;