From f94f03d48f1b5818e7f54157a302729981fba226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Wed, 9 Oct 2024 03:04:43 +0200 Subject: [PATCH] group: fix warning Fixes: -bash-5.2$ make (...) cc -Werror -DNVERBOSE -fPIC -Wall -Wextra -D_GNU_SOURCE -DVERSION=23 -DPREFIX=/usr/local -c -o group.o /home/freebox/src/iamroot/group.c /home/freebox/src/iamroot/group.c:61:12: error: unused variable 'fd' [-Werror,-Wunused-variable] const int fd = fileno(f); ^ /home/freebox/src/iamroot/group.c:119:12: error: unused variable 'fd' [-Werror,-Wunused-variable] const int fd = fileno(f); ^ 2 errors generated. --- group.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/group.c b/group.c index ebbb4835..588cc583 100644 --- a/group.c +++ b/group.c @@ -60,6 +60,7 @@ struct group *fgetgrent(FILE *f) { const int fd = fileno(f); struct group *ret; + (void)fd; ret = _fgetgrent(f); @@ -118,6 +119,7 @@ int putgrent(const struct group *gr, FILE *f) { const int fd = fileno(f); int ret; + (void)fd; ret = _putgrent(gr, f);