mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 13:23:27 -04:00
Add UNUSED macro, enable clangd unused parameter warnings
This commit is contained in:
@@ -12,7 +12,7 @@ CompileFlags:
|
||||
"-Wbitwise-op-parentheses",
|
||||
"-Wunused-variable",
|
||||
# "-Wunused-but-set-variable",
|
||||
# "-Wunused-parameter",
|
||||
"-Wunused-parameter",
|
||||
"-Wunused-but-set-parameter",
|
||||
"-Wself-assign",
|
||||
]
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#define IS_ALIGNED(X, N) (((X) & ((N)-1)) == 0)
|
||||
#define IS_NOT_ALIGNED(X, N) (((X) & ((N)-1)) != 0)
|
||||
|
||||
// Silence unused parameter warnings.
|
||||
// TP debug suggests the original devs used something like this.
|
||||
#define UNUSED(x) ((void)(x))
|
||||
|
||||
#define JUT_EXPECT(...)
|
||||
#define ASSERT(...)
|
||||
#define LOGF(FMT, ...)
|
||||
|
||||
@@ -26,6 +26,7 @@ static u32 ita_Ef[] = { BITA_BRK_EF_BTDITA0, BITA_BRK_EF_BTDITA1 };
|
||||
|
||||
/* 00000078-000000C4 .text b_a_sub__FPvPv */
|
||||
static void* b_a_sub(void* search, void* user) {
|
||||
UNUSED(user);
|
||||
if (fopAc_IsActor(search) && fopAcM_GetName(search) == PROC_BTD)
|
||||
return search;
|
||||
return NULL;
|
||||
|
||||
@@ -607,6 +607,7 @@ void move(bmdfoot_class* i_this) {
|
||||
|
||||
/* 000021B8-00002204 .text s_a_d_sub__FPvPv */
|
||||
void* s_a_d_sub(void* search, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if ((fopAc_IsActor(search)) && (fopAcM_GetName(search) == PROC_BMD)) {
|
||||
return search;
|
||||
} else {
|
||||
|
||||
@@ -637,6 +637,7 @@ void hand_move(bmdhand_class* i_this) {
|
||||
|
||||
/* 00002E74-00002EC0 .text s_a_d_sub__FPvPv */
|
||||
void* s_a_d_sub(void* param_1, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if ((fopAc_IsActor(param_1)) && (fopAcM_GetName(param_1) == PROC_BMD)) {
|
||||
return param_1;
|
||||
} else {
|
||||
|
||||
@@ -877,6 +877,7 @@ void light_on_off(bpw_class* i_this) {
|
||||
|
||||
/* 0000242C-000024B0 .text skull_search_sub__FPvPv */
|
||||
void* skull_search_sub(void* param_1, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)param_1;
|
||||
|
||||
if ((get_check_count < 100) && (fopAc_IsActor(actor))) {
|
||||
|
||||
@@ -1769,6 +1769,7 @@ void move(btd_class* i_this) {
|
||||
|
||||
/* 00005BCC-00005C24 .text k_a_d_sub__FPvPv */
|
||||
void* k_a_d_sub(void* i_this, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if (((fopAc_IsActor(i_this)) && (fopAcM_GetName(i_this) == PROC_KUI)) && (fopAcM_GetParam(i_this) == 0x511)) {
|
||||
return i_this;
|
||||
}
|
||||
@@ -1777,6 +1778,7 @@ void* k_a_d_sub(void* i_this, void* param_2) {
|
||||
|
||||
/* 00005C24-00005C70 .text dr2_a_d_sub__FPvPv */
|
||||
void* dr2_a_d_sub(void* i_this, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if ((fopAc_IsActor(i_this)) && (fopAcM_GetName(i_this) == PROC_DR2)) {
|
||||
return i_this;
|
||||
} else {
|
||||
@@ -1786,6 +1788,7 @@ void* dr2_a_d_sub(void* i_this, void* param_2) {
|
||||
|
||||
/* 00005C70-00005CC8 .text wepon_s_sub__FPvPv */
|
||||
void* wepon_s_sub(void* i_this, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if (((fopAc_IsActor(i_this)) && (fopAcM_GetName(i_this) == PROC_HIMO2)) || (fopAcM_GetName(i_this) == PROC_BOOMERANG)) {
|
||||
return i_this;
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ void g_eff_off(bwd_class* i_this) {
|
||||
|
||||
/* 000001CC-00000250 .text ko_s_sub__FPvPv */
|
||||
void* ko_s_sub(void* param_1, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)param_1;
|
||||
|
||||
if ((fopAc_IsActor(actor)) && (fopAcM_GetName(actor) == PROC_BWDS)) {
|
||||
@@ -126,6 +127,7 @@ void* ko_s_sub(void* param_1, void* param_2) {
|
||||
|
||||
/* 00000250-0000029C .text ko_delete_sub__FPvPv */
|
||||
void* ko_delete_sub(void* param_1, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
bwds_class* actor = (bwds_class*)param_1;
|
||||
|
||||
if ((fopAc_IsActor(actor)) && (fopAcM_GetName(actor) == PROC_BWDS)) {
|
||||
|
||||
@@ -153,6 +153,7 @@ static void wave_cont(bwdg_class* i_this, u8 r4) {
|
||||
|
||||
/* 00000734-00000780 .text boss_a_d_sub__FPvPv */
|
||||
static void* boss_a_d_sub(void* param_1, void* param_2) {
|
||||
UNUSED(param_2);
|
||||
if (fopAc_IsActor(param_1) && fopAcM_GetName(param_1) == PROC_BWD) {
|
||||
return param_1;
|
||||
}
|
||||
|
||||
@@ -271,6 +271,7 @@ void damage_mode_move(cc_class* i_this) {
|
||||
|
||||
/* 00000C74-00000D30 .text s_b_sub__FPvPv */
|
||||
void* s_b_sub(void* arg0, void* arg1) {
|
||||
UNUSED(arg1);
|
||||
if (fopAcM_IsActor(arg0)) {
|
||||
bool bVar2 = false;
|
||||
if (fopAcM_GetName(arg0) == PROC_BOMB) {
|
||||
|
||||
@@ -186,6 +186,7 @@ static BOOL daDr2_Draw(dr2_class* i_this) {
|
||||
|
||||
/* 000006D4-00000720 .text s_a_d_sub__FPvPv */
|
||||
void* s_a_d_sub(void* ac1, void* ac2) {
|
||||
UNUSED(ac2);
|
||||
if (fopAcM_IsActor(ac1) && fopAcM_GetName(ac1) == PROC_BTD) {
|
||||
return ac1;
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ fopAc_ac_c* search_esa(kamome_class* i_this) {
|
||||
|
||||
/* 00000A44-00000A90 .text s_a_i_sub__FPvPv */
|
||||
void* s_a_i_sub(void* ac1, void* ac2) {
|
||||
UNUSED(ac2);
|
||||
if (fopAc_IsActor(ac1) && fpcM_GetName(ac1) == PROC_NPC_LS1) {
|
||||
return ac1;
|
||||
}
|
||||
@@ -257,6 +258,7 @@ void kamome_ground_pos_move(kamome_class* i_this) {
|
||||
|
||||
/* 00001150-000011B8 .text ko_s_sub__FPvPv */
|
||||
void* ko_s_sub(void* ac1, void* ac2) {
|
||||
UNUSED(ac2);
|
||||
kamome_class* i_this = (kamome_class*)ac1;
|
||||
if (fopAcM_IsActor(&i_this->actor) && fopAcM_GetName(&i_this->actor) == PROC_KAMOME && (fopAcM_GetParam(&i_this->actor) & 0xf) == 7) {
|
||||
ko_count++;
|
||||
@@ -292,6 +294,7 @@ void heisou_control(kamome_class* i_this) {
|
||||
|
||||
/* 00001304-00001360 .text h_s_sub__FPvPv */
|
||||
void* h_s_sub(void* ac1, void* ac2) {
|
||||
UNUSED(ac2);
|
||||
kamome_class* i_this = (kamome_class*)ac1;
|
||||
if (fopAcM_IsActor(&i_this->actor) && fopAcM_GetName(&i_this->actor) == PROC_KAMOME && (fopAcM_GetParam(&i_this->actor) & 0xf) == 6) {
|
||||
return &i_this->actor;
|
||||
|
||||
Reference in New Issue
Block a user