add support for [[maybe_unused]] if available

This commit is contained in:
nhmall
2025-08-07 21:47:40 -04:00
parent 93803de413
commit b876381b72
3 changed files with 24 additions and 3 deletions

View File

@@ -1311,7 +1311,7 @@ extern void objects_globals_init(void);
DISABLE_WARNING_UNREACHABLE_CODE
int
main(int argc UNUSED, char *argv[] UNUSED)
main(int argc, char *argv[])
{
int i, tilenum;
char filename[30];
@@ -1395,6 +1395,8 @@ main(int argc UNUSED, char *argv[] UNUSED)
free_tilerefs();
exit(EXIT_SUCCESS);
/*NOTREACHED*/
nhUse(argc);
nhUse(argv);
return 0;
}
@@ -1491,7 +1493,7 @@ add_tileref(
const char *prefix)
{
struct tiles_used temp = { 0 };
static const char ellipsis[] UNUSED = "...";
static const char ellipsis[] = "...";
char buf[BUFSZ];
if (!tilelist[n]) {
@@ -1519,6 +1521,7 @@ add_tileref(
(strlen(temp.references) >= (sizeof temp.references - 7) - 1)
? buf
: "");
nhUse(ellipsis);
}
void