Bug 258471 - emulators/elliott: fix build with clang 13
Summary: emulators/elliott: fix build with clang 13
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 258209
  Show dependency treegraph
 
Reported: 2021-09-13 07:59 UTC by Dimitry Andric
Modified: 2021-09-16 05:57 UTC (History)
1 user (show)

See Also:


Attachments
emulators/elliott: fix unused but set variable (769 bytes, patch)
2021-09-13 07:59 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2021-09-13 07:59:21 UTC
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.
Comment 1 Dimitry Andric freebsd_committer 2021-09-13 07:59:53 UTC
Created attachment 227867 [details]
emulators/elliott: fix unused but set variable
Comment 2 Fernando Apesteguía freebsd_committer 2021-09-16 05:57:20 UTC
^Triage: Reporter is committer, assign accordingly.