From 552461df5173d4e3db405f92472296d544d887b1 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 23:50:55 +0200 Subject: [PATCH] Fix all compiler warnings in build output (#176) Agent-Logs-Url: https://github.com/tbamud/tbamud/sessions/d031438d-2711-4447-b3df-9819d95d4058 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: welcor <357770+welcor@users.noreply.github.com> --- src/act.wizard.c | 5 ++++- src/castle.c | 6 +++--- src/improved-edit.c | 2 +- src/interpreter.c | 3 ++- src/quest.c | 2 +- src/spec_procs.c | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/act.wizard.c b/src/act.wizard.c index b0694ee..158c91e 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -2396,7 +2396,10 @@ ACMD(do_wizutil) act("A sudden fireball conjured from nowhere thaws $n!", FALSE, vict, 0, 0, TO_ROOM); break; case SCMD_UNAFFECT: - if (vict->affected || AFF_FLAGS(vict)) { + for (taeller = 0; taeller < AF_ARRAY_MAX; taeller++) + if (AFF_FLAGS(vict)[taeller]) + break; + if (vict->affected || taeller < AF_ARRAY_MAX) { while (vict->affected) affect_remove(vict, vict->affected); for(taeller=0; taeller < AF_ARRAY_MAX; taeller++) diff --git a/src/castle.c b/src/castle.c index 15a4c33..df30806 100644 --- a/src/castle.c +++ b/src/castle.c @@ -374,9 +374,9 @@ SPECIAL(king_welmar) "$n proclaims 'principe dignos'." }; - const char bedroom_path[] = "s33004o1c1S."; - const char throne_path[] = "W3o3cG52211rg."; - const char monolog_path[] = "ABCDPPPP."; + static const char bedroom_path[] = "s33004o1c1S."; + static const char throne_path[] = "W3o3cG52211rg."; + static const char monolog_path[] = "ABCDPPPP."; static const char *path; static int path_index; diff --git a/src/improved-edit.c b/src/improved-edit.c index b549b54..f262106 100644 --- a/src/improved-edit.c +++ b/src/improved-edit.c @@ -367,7 +367,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d) s++; temp = *s; *s = '\0'; - char buf3[9]; + char buf3[13]; sprintf(buf3, "%4d: ", (i - 1)); strncat(buf, buf3, sizeof(buf) - strlen(buf) - 1); strncat(buf, t, sizeof(buf) - strlen(buf) - 1); diff --git a/src/interpreter.c b/src/interpreter.c index 0dadad0..1bdaec8 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -1612,8 +1612,9 @@ void nanny(struct descriptor_data *d, char *arg) if (load_result == CLASS_UNDEFINED) { write_to_output(d, "\r\nThat's not a class.\r\nClass: "); return; - } else + } else { GET_CLASS(d->character) = load_result; + } if (d->olc) { free(d->olc); diff --git a/src/quest.c b/src/quest.c index 53ad04d..054e6bb 100644 --- a/src/quest.c +++ b/src/quest.c @@ -650,7 +650,7 @@ static void quest_show(struct char_data *ch, mob_vnum qm) send_to_char(ch, "There are no quests available here at the moment.\r\n"); } -static void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH]) +static void quest_stat(struct char_data *ch, char *argument) { qst_rnum rnum; mob_rnum qmrnum; diff --git a/src/spec_procs.c b/src/spec_procs.c index c852622..f3e7eb6 100644 --- a/src/spec_procs.c +++ b/src/spec_procs.c @@ -202,9 +202,9 @@ SPECIAL(mayor) { char actbuf[MAX_INPUT_LENGTH]; - const char open_path[] = + static const char open_path[] = "W3a3003b33000c111d0d111Oe333333Oe22c222112212111a1S."; - const char close_path[] = + static const char close_path[] = "W3a3003b33000c111d0d111CE333333CE22c222112212111a1S."; static const char *path = NULL;