This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 5a73a6f12 games/NXDoom: drop the assignments left over from dehacked
5a73a6f12 is described below
commit 5a73a6f124adcb6a9b3e3a73dcccc1bb4ad3c2ca
Author: Jorge Guzman <[email protected]>
AuthorDate: Sun Aug 2 12:31:21 2026 -0300
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 <[email protected]>
---
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 a9d964aff..6583fcbaf 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 241ffcfa6..dfc4ce85a 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 9dfd61abc..6976d44fe 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++));