aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-09-13 07:56:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-10-02 11:24:44 +0000
commit9324aed8ec1e8eded0cf24824d5fc8732a93155b (patch)
treefa357dbd440c75250765d98ed226c4acda90c17c /emulators
parent0efce95397d4b53be14448a803902191ab8c1df3 (diff)
downloadports-9324aed8ec1e8eded0cf24824d5fc8732a93155b.tar.gz
ports-9324aed8ec1e8eded0cf24824d5fc8732a93155b.zip
emulators/elliott: fix unused but set variable
During an exp-run for llvm 13 (see bug 258209), it turned out that emulators/elliott fails to build with clang 13: emulator.c:536:20: error: variable 'y' set but not used [-Werror,-Wunused-but-set-variable] int x, x1, y; ^ 1 error generated. This is because x, x1 and y are used in ncurses getyx() macros, but in this case the program is not interested in the y result. Mark it as __unused to get rid of the warning. PR: 258471 Approved by: maintainer timeout (2 weeks) MFH: 2021Q4
Diffstat (limited to 'emulators')
-rw-r--r--emulators/elliott-803/files/patch-emulator_emulator.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/emulators/elliott-803/files/patch-emulator_emulator.c b/emulators/elliott-803/files/patch-emulator_emulator.c
new file mode 100644
index 000000000000..c8cd49eb7858
--- /dev/null
+++ b/emulators/elliott-803/files/patch-emulator_emulator.c
@@ -0,0 +1,11 @@
+--- emulator/emulator.c.orig 2020-11-27 12:36:20 UTC
++++ emulator/emulator.c
+@@ -533,7 +533,7 @@ bool handle_key(commands_t *cmd,
+ wch[0] = c;
+ wch[1] = L'\0';
+
+- int x, x1, y;
++ int x, x1, y __unused;
+ getyx(pads->status, y, x);
+
+ waddwstr(pads->status, wch);