Skip to content

Commit

Permalink
shadow: fix warning
Browse files Browse the repository at this point in the history
Fixes:

	gportay@archlinux ~/src/iamroot $ make
	(...)
	cc -g -Werror -DNVERBOSE -fPIC -Wall -Wextra -D_GNU_SOURCE -DVERSION=23 -DPREFIX=/usr/local  -c -o shadow.o /home/gportay/src/iamroot/shadow.c
	/home/gportay/src/iamroot/shadow.c: In function ‘fgetspent’:
	/home/gportay/src/iamroot/shadow.c:55:19: error: unused variable ‘fd’ [-Werror=unused-variable]
	   55 |         const int fd = fileno(f);
	      |                   ^~
	/home/gportay/src/iamroot/shadow.c: In function ‘putspent’:
	/home/gportay/src/iamroot/shadow.c:91:19: error: unused variable ‘fd’ [-Werror=unused-variable]
	   91 |         const int fd = fileno(f);
	      |                   ^~
	cc1: all warnings being treated as errors
  • Loading branch information
gportay committed Oct 9, 2024
1 parent 2f2c82d commit 8f9cd55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shadow.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct spwd *fgetspent(FILE *f)
{
const int fd = fileno(f);
struct spwd *ret;
(void)fd;

ret = _fgetspent(f);

Expand Down Expand Up @@ -90,6 +91,7 @@ int putspent(const struct spwd *sp, FILE *f)
{
const int fd = fileno(f);
int ret;
(void)fd;

ret = _putspent(sp, f);

Expand Down

0 comments on commit 8f9cd55

Please sign in to comment.