rpcgen cretes C code with unused variables, so just disable gcc unused variable warning for rpc generated code. Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> --- Makefile.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index a12affb..da2fc96 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,6 +16,7 @@ DESTDIR=/ CC=@CC@ CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\" CFLAGS+=`pkg-config --cflags libtirpc` +CFLAGS_RPCGEN=-Wno-unused-variable LIBS+=`pkg-config --libs libtirpc` EXEEXT=@EXEEXT@ @@ -58,7 +59,7 @@ nfs.h: nfs.x mount_xdr.o: mount_xdr.c mount.h @echo Compiling $@ - gcc -g $(CFLAGS) -c mount_xdr.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ mount_xdr.c: mount.x @echo Generating $@ @@ -66,7 +67,7 @@ mount_xdr.c: mount.x mount_client.o: mount_client.c mount.h @echo Compiling $@ - gcc -g $(CFLAGS) -c mount_client.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ mount_client.c: mount.x @echo Generating $@ @@ -74,7 +75,7 @@ mount_client.c: mount.x nfs_xdr.o: nfs_xdr.c nfs.h @echo Compiling $@ - gcc $(CFLAGS) -g -c nfs_xdr.c -o $@ + gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ nfs_xdr.c: nfs.x @echo Generating $@ @@ -82,7 +83,7 @@ nfs_xdr.c: nfs.x nfs_client.o: nfs_client.c nfs.h @echo Compiling $@ - gcc -g $(CFLAGS) -c nfs_client.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ nfs_client.c: nfs.x @echo Generating $@ -- 2.34.1