add attributes to suppress warnings

While C23 features supersede these, these work on gcc, clang and tcc.
This commit is contained in:
Zsombor Barna 2024-02-19 13:15:18 +01:00
parent 29497c8f10
commit 492eef4663
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,7 @@ static int got_hup = 0;
int verbose = 0;
static void hup_handler(int signum) {
static void hup_handler(int signum __attribute__((unused))) {
got_hup = 0;
}
@ -34,6 +34,7 @@ int main(int argc, char *const argv[]) {
case 'c': config = optarg; break;
case 'h':
ret = EXIT_SUCCESS;
__attribute__((fallthrough));
default:
printf("actkbd [-d DEVICE|-c CONFIG_FILE|-h|-v]\n");
exit(ret);