From 335c3e228d1a6c1bbb504e8819706a8bddbc834e Mon Sep 17 00:00:00 2001 From: Jorge Guzman Date: Sun, 2 Aug 2026 12:31:21 -0300 Subject: [PATCH] games/NXDoom: drop the assignments left over from dehacked Six statements assign a variable to itself, which clang rejects: src/doom/f_finale.c:637:16: error: explicitly assigning value of variable of type 'const char *' to itself [-Werror,-Wself-assign] 637 | lumpname = (lumpname); Chocolate DOOM wraps those strings in DEH_String() so that a dehacked patch can substitute them. The port has no dehacked support, and the macro went away with it, leaving the parentheses behind. Two comments that only described the substitution go as well. Nothing changes at run time. GCC does not warn about this, so the configurations built so far never noticed; the ones built with clang do, and they fail because the CI treats warnings as errors. Signed-off-by: Jorge Guzman --- games/NXDoom/src/doom/f_finale.c | 7 ------- games/NXDoom/src/doom/g_game.c | 3 --- games/NXDoom/src/doom/hu_stuff.c | 3 --- 3 files changed, 13 deletions(-) diff --git a/games/NXDoom/src/doom/f_finale.c b/games/NXDoom/src/doom/f_finale.c index a9d964affba..6583fcbaf90 100644 --- a/games/NXDoom/src/doom/f_finale.c +++ b/games/NXDoom/src/doom/f_finale.c @@ -634,8 +634,6 @@ static void f_art_screen_drawer(void) return; } - lumpname = (lumpname); - v_draw_patch(0, 0, w_cache_lump_name(lumpname, PU_CACHE)); } } @@ -688,11 +686,6 @@ void f_start_finale(void) } } - /* Do dehacked substitutions of strings */ - - finaletext = (finaletext); - finaleflat = (finaleflat); - finalestage = F_STAGE_TEXT; finalecount = 0; } diff --git a/games/NXDoom/src/doom/g_game.c b/games/NXDoom/src/doom/g_game.c index 241ffcfa678..dfc4ce85a2e 100644 --- a/games/NXDoom/src/doom/g_game.c +++ b/games/NXDoom/src/doom/g_game.c @@ -442,8 +442,6 @@ static void g_do_load_level(void) skytexturename = "SKY3"; } - skytexturename = (skytexturename); - skytexture = r_texture_num_for_name(skytexturename); } @@ -2285,7 +2283,6 @@ void g_init_new(skill_t skill, int episode, int map) break; } - skytexturename = (skytexturename); skytexture = r_texture_num_for_name(skytexturename); } diff --git a/games/NXDoom/src/doom/hu_stuff.c b/games/NXDoom/src/doom/hu_stuff.c index 9dfd61abc38..6976d44fe15 100644 --- a/games/NXDoom/src/doom/hu_stuff.c +++ b/games/NXDoom/src/doom/hu_stuff.c @@ -381,9 +381,6 @@ void hu_start(void) s = HU_TITLE_CHEX; } - /* dehacked substitution to get modified level name */ - - s = (s); while (*s) { hu_lib_add_char_to_text_line(&w_title, *(s++));