浏览代码

Fixes compile errors on GCC 10.2 (#5631)

* Fixes #5629.
* Removes va_list from nullpo checks.
Thanks to @behelit2!
Aleos 4 年之前
父节点
当前提交
626b93e6c6
共有 2 个文件被更改,包括 0 次插入6 次删除
  1. 0 3
      src/map/instance.cpp
  2. 0 3
      src/map/skill.cpp

+ 0 - 3
src/map/instance.cpp

@@ -467,7 +467,6 @@ static int instance_npcinit(struct block_list *bl, va_list ap)
 	struct npc_data* nd;
 
 	nullpo_retr(0, bl);
-	nullpo_retr(0, ap);
 	nullpo_retr(0, nd = (struct npc_data *)bl);
 
 	return npc_instanceinit(nd);
@@ -481,7 +480,6 @@ static int instance_npcdestroy(struct block_list *bl, va_list ap)
 	struct npc_data* nd;
 
 	nullpo_retr(0, bl);
-	nullpo_retr(0, ap);
 	nullpo_retr(0, nd = (struct npc_data *)bl);
 
 	return npc_instancedestroy(nd);
@@ -495,7 +493,6 @@ static int instance_addnpc_sub(struct block_list *bl, va_list ap)
 	struct npc_data* nd;
 
 	nullpo_retr(0, bl);
-	nullpo_retr(0, ap);
 	nullpo_retr(0, nd = (struct npc_data *)bl);
 
 	return npc_duplicate4instance(nd, va_arg(ap, int));

+ 0 - 3
src/map/skill.cpp

@@ -18072,7 +18072,6 @@ int skill_graffitiremover(struct block_list *bl, va_list ap)
 	int remove = va_arg(ap, int);
 
 	nullpo_retr(0, bl);
-	nullpo_retr(0, ap);
 
 	if (bl->type != BL_SKILL || (unit = (struct skill_unit *)bl) == NULL)
 		return 0;
@@ -18106,7 +18105,6 @@ int skill_greed(struct block_list *bl, va_list ap)
 int skill_detonator(struct block_list *bl, va_list ap)
 {
 	nullpo_ret(bl);
-	nullpo_ret(ap);
 
 	if (bl->type != BL_SKILL)
 		return 0;
@@ -18194,7 +18192,6 @@ static int skill_bind_trap(struct block_list *bl, va_list ap) {
 	struct block_list *src = NULL;
 
 	nullpo_ret(bl);
-	nullpo_ret(ap);
 
 	src = va_arg(ap,struct block_list *);