From db28c70e19f22d3a739daa1db99dd060a477635e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Alexandre=20C=C3=B4t=C3=A9?= Date: Mon, 3 Nov 2025 05:51:10 -0800 Subject: [PATCH] Addressed errors flagged by recent version of GCC --- frotz/src/games/anchor.c | 6 +++--- frotz/src/games/curses.c | 2 +- frotz/src/games/hollywood.c | 8 +++++--- frotz/src/games/huntdark.c | 4 ++-- frotz/src/games/jewel.c | 2 +- frotz/src/games/library.c | 4 ++-- frotz/src/games/loose.c | 4 ++-- frotz/src/games/lurking.c | 10 ++++++---- frotz/src/games/partyfoul.c | 5 ++--- frotz/src/games/seastalker.c | 6 +++--- frotz/src/games/sherbet.c | 4 ++-- frotz/src/games/sherlock.c | 2 +- frotz/src/games/snacktime.c | 4 ++-- frotz/src/games/theatre.c | 4 ++-- frotz/src/games/trinity.c | 4 ++-- frotz/src/games/tryst.c | 4 ++-- frotz/src/interface/frotz_interface.c | 2 +- frotz/src/ztools/showdict.c | 2 +- 18 files changed, 40 insertions(+), 37 deletions(-) diff --git a/frotz/src/games/anchor.c b/frotz/src/games/anchor.c index 63f932f5..0c733c77 100644 --- a/frotz/src/games/anchor.c +++ b/frotz/src/games/anchor.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,9 +24,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Anchorhead: http://ifdb.tads.org/viewgame?id=op0uw1gn1tjqmjt7 -const char *anchor_intro[] = { "\n", "\n", "\n" }; +char *anchor_intro[] = { "\n", "\n", "\n" }; -const zword anchor_special_ram_addrs[4] = { +zword anchor_special_ram_addrs[4] = { 21922, // Combination lock 40660, // Bathe 38470, // Transitions between days diff --git a/frotz/src/games/curses.c b/frotz/src/games/curses.c index 9b704d14..870de959 100644 --- a/frotz/src/games/curses.c +++ b/frotz/src/games/curses.c @@ -36,7 +36,7 @@ const zword curses_special_ram_addrs[9] = { 20911, // Turn sceptre }; -const char *curses_intro[] = { "\n" }; +char *curses_intro[] = { "\n" }; zword* curses_ram_addrs(int *n) { *n = 9; diff --git a/frotz/src/games/hollywood.c b/frotz/src/games/hollywood.c index 38cc7d70..7f96c779 100644 --- a/frotz/src/games/hollywood.c +++ b/frotz/src/games/hollywood.c @@ -32,9 +32,11 @@ const zword hollywood_special_ram_addrs[5] = { 8381, // Safe dial }; -const char *hollywood_intro[] = { "turn statue west\n", - "turn statue east\n", - "turn statue north\n" }; +char *hollywood_intro[] = { + "turn statue west\n", + "turn statue east\n", + "turn statue north\n" +}; zword* hollywood_ram_addrs(int *n) { *n = 5; diff --git a/frotz/src/games/huntdark.c b/frotz/src/games/huntdark.c index c4ecf100..c2385d89 100644 --- a/frotz/src/games/huntdark.c +++ b/frotz/src/games/huntdark.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ const zword huntdark_special_ram_addrs[4] = { 8824, // Bats }; -const char *huntdark_intro[] = { "\n", "\n" }; +char *huntdark_intro[] = { "\n", "\n" }; zword* huntdark_ram_addrs(int *n) { *n = 4; diff --git a/frotz/src/games/jewel.c b/frotz/src/games/jewel.c index 4294e8ea..4fbb8bfa 100644 --- a/frotz/src/games/jewel.c +++ b/frotz/src/games/jewel.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // The Jewel of Knowledge: http://ifdb.tads.org/viewgame?id=hu60gp1bgkhlo5yx -const char *jewel_intro[] = { "bypass\n", "yes\n" }; +char *jewel_intro[] = { "bypass\n", "yes\n" }; zword* jewel_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/library.c b/frotz/src/games/library.c index 26fb8492..b0053928 100644 --- a/frotz/src/games/library.c +++ b/frotz/src/games/library.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // All Quiet on the Library Front: http://ifdb.tads.org/viewgame?id=400zakqderzjnu1i -const char *library_intro[] = { "\n" }; +char *library_intro[] = { "\n" }; zword* library_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/loose.c b/frotz/src/games/loose.c index d47bb5b9..1c1816fb 100644 --- a/frotz/src/games/loose.c +++ b/frotz/src/games/loose.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Mother Loose: http://ifdb.tads.org/viewgame?id=4wd3lyaxi4thp8qi -const char *loose_intro[] = { "\n" }; +char *loose_intro[] = { "\n" }; zword* loose_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/lurking.c b/frotz/src/games/lurking.c index cae09554..4411e612 100644 --- a/frotz/src/games/lurking.c +++ b/frotz/src/games/lurking.c @@ -34,10 +34,12 @@ const zword lurking_special_ram_addrs[6] = { 883, // Cutting line }; -const char *lurking_intro[] = { "sit on chair\n", - "turn pc on\n", - "login 872325412\n", - "password uhlersoth\n" }; +char *lurking_intro[] = { + "sit on chair\n", + "turn pc on\n", + "login 872325412\n", + "password uhlersoth\n" +}; zword* lurking_ram_addrs(int *n) { *n = 6; diff --git a/frotz/src/games/partyfoul.c b/frotz/src/games/partyfoul.c index 146a46b1..89f61cc8 100644 --- a/frotz/src/games/partyfoul.c +++ b/frotz/src/games/partyfoul.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,8 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Party Foul - http://ifdb.tads.org/viewgame?id=cqwq699i9qiqdju -const char *partyfoul_intro[] = { "\n", - "no\n" }; +char *partyfoul_intro[] = { "\n", "no\n" }; zword* partyfoul_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/seastalker.c b/frotz/src/games/seastalker.c index 49605060..8aa1cd56 100644 --- a/frotz/src/games/seastalker.c +++ b/frotz/src/games/seastalker.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Seastalker: http://ifdb.tads.org/viewgame?id=56wb8hflec2isvzm -const char *seastalker_intro[] = { "John\n", "Wayne\n", "yes\n" }; +char *seastalker_intro[] = { "John\n", "Wayne\n", "yes\n" }; const zword seastalker_special_ram_addrs[1] = { 9740, // Tracks scimitar location @@ -32,7 +32,7 @@ const zword seastalker_special_ram_addrs[1] = { zword* seastalker_ram_addrs(int *n) { *n = 1; - return seastalker_ram_addrs; + return seastalker_special_ram_addrs; } char** seastalker_intro_actions(int *n) { diff --git a/frotz/src/games/sherbet.c b/frotz/src/games/sherbet.c index 92a4649b..a1cfd79b 100644 --- a/frotz/src/games/sherbet.c +++ b/frotz/src/games/sherbet.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // The Meteor, the Stone and a Long Glass of Sherbet: http://ifdb.tads.org/viewgame?id=273o81yvg64m4pkz -const char *sherbet_intro[] = { " \n" }; +char *sherbet_intro[] = { " \n" }; zword* sherbet_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/sherlock.c b/frotz/src/games/sherlock.c index f3fd3e54..d57b4716 100644 --- a/frotz/src/games/sherlock.c +++ b/frotz/src/games/sherlock.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Sherlock: http://ifdb.tads.org/viewgame?id=ug3qu521hze8bsvz -const char *sherlock_intro[] = { "\n" }; +char *sherlock_intro[] = { "\n" }; zword* sherlock_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/snacktime.c b/frotz/src/games/snacktime.c index 47aa43fe..57c24033 100644 --- a/frotz/src/games/snacktime.c +++ b/frotz/src/games/snacktime.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Snack Time!: http://ifdb.tads.org/viewgame?id=yr3y8s9k8e40hl5q -const char *snacktime_intro[] = { "\n" }; +char *snacktime_intro[] = { "\n" }; const zword snacktime_special_ram_addrs[2] = { 20743, // Used to quantify how awake the pet is diff --git a/frotz/src/games/theatre.c b/frotz/src/games/theatre.c index 0045a5e3..00630b5a 100644 --- a/frotz/src/games/theatre.c +++ b/frotz/src/games/theatre.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ const zword theatre_special_ram_addrs[2] = { 17834, // Track watch hand }; -const char *theatre_intro[] = { "\n" }; +char *theatre_intro[] = { "\n" }; zword* theatre_ram_addrs(int *n) { *n = 2; diff --git a/frotz/src/games/trinity.c b/frotz/src/games/trinity.c index 57224c7b..221a8814 100644 --- a/frotz/src/games/trinity.c +++ b/frotz/src/games/trinity.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Trinity: http://ifdb.tads.org/viewgame?id=j18kjz80hxjtyayw -const char *trinity_intro[] = { "\n" }; +char *trinity_intro[] = { "\n" }; zword* trinity_ram_addrs(int *n) { *n = 0; diff --git a/frotz/src/games/tryst.c b/frotz/src/games/tryst.c index cc45c43e..c3312bdf 100644 --- a/frotz/src/games/tryst.c +++ b/frotz/src/games/tryst.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2018 Microsoft Corporation This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ const zword tryst_special_ram_addrs[18] = { 9362, // Door }; -const char *tryst_intro[] = { "\n" }; +char *tryst_intro[] = { "\n" }; zword* tryst_ram_addrs(int *n) { *n = 18; diff --git a/frotz/src/interface/frotz_interface.c b/frotz/src/interface/frotz_interface.c index bebc3f41..b188850a 100644 --- a/frotz/src/interface/frotz_interface.c +++ b/frotz/src/interface/frotz_interface.c @@ -1649,7 +1649,7 @@ void get_object(zobject *obj, zword obj_num) { } (*obj).num = obj_num; - get_text(0, obj_name_addr+1, &(*obj).name); + get_text(0, obj_name_addr+1, (*obj).name); (*obj).parent = get_parent(obj_num); (*obj).sibling = get_sibling(obj_num); diff --git a/frotz/src/ztools/showdict.c b/frotz/src/ztools/showdict.c index 630779af..461e3ec7 100644 --- a/frotz/src/ztools/showdict.c +++ b/frotz/src/ztools/showdict.c @@ -86,7 +86,7 @@ int dict_size; /* Display the text for the word */ - decode_text_to_buffer(&word_address, &(dict_word->word)); + decode_text_to_buffer(&word_address, dict_word->word); /* Get the data for each entry */