diff mbox series

[2/2] nfs-utils: configure.ac: Do not fatalize -Wstrict-prototypes with internal rpcgen.

Message ID 5be14884.1c69fb81.a6fae.51d4@mx.google.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Yang Bo Nov. 6, 2018, 7:53 a.m. UTC
The internal rpcgen is not able to generate -Wstrict-prototypes free code,
the problematic files are:

./tests/nsm_client/nlm_sm_inter_svc.c
./support/nsm/sm_inter_svc.c

Signed-off-by: Yang Bo <rslovers@yandex.com>
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Steve Dickson Nov. 29, 2018, 8:01 p.m. UTC | #1
On 11/6/18 2:53 AM, Yang Bo wrote:
> The internal rpcgen is not able to generate -Wstrict-prototypes free code,
> the problematic files are:
> 
> ./tests/nsm_client/nlm_sm_inter_svc.c
> ./support/nsm/sm_inter_svc.c
> 
> Signed-off-by: Yang Bo <rslovers@yandex.com>
Committed....

steved.

> ---
>  configure.ac | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 3caeebc..ad2985c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -149,6 +149,7 @@ AC_ARG_WITH(rpcgen,
>  	[AC_HELP_STRING([--with-rpcgen=internal], [use internal rpcgen instead of system one])],
>  	rpcgen_path=$withval,
>  	rpcgen_path=yes )
> +	rpcgen_cflags=-Werror=strict-prototypes
>  	RPCGEN_PATH=
>  	if test "$rpcgen_path" = "yes"; then
>  	    for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
> @@ -157,6 +158,7 @@ AC_ARG_WITH(rpcgen,
>  	    RPCGEN_PATH=$rpcgen_path
>  	else
>  	    RPCGEN_PATH=internal
> +	    rpcgen_cflags=-Wstrict-prototypes
>  	fi
>  	AC_SUBST(RPCGEN_PATH)
>  	AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"])
> @@ -542,7 +544,7 @@ my_am_cflags="\
>   -pipe \
>   -Wall \
>   -Wextra \
> - -Werror=strict-prototypes \
> + $rpcgen_cflags \
>   -Werror=missing-prototypes \
>   -Werror=missing-declarations \
>   -Werror=format=2 \
>
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 3caeebc..ad2985c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,7 @@  AC_ARG_WITH(rpcgen,
 	[AC_HELP_STRING([--with-rpcgen=internal], [use internal rpcgen instead of system one])],
 	rpcgen_path=$withval,
 	rpcgen_path=yes )
+	rpcgen_cflags=-Werror=strict-prototypes
 	RPCGEN_PATH=
 	if test "$rpcgen_path" = "yes"; then
 	    for p in /usr/local/bin/rpcgen /usr/bin/rpcgen /bin/rpcgen
@@ -157,6 +158,7 @@  AC_ARG_WITH(rpcgen,
 	    RPCGEN_PATH=$rpcgen_path
 	else
 	    RPCGEN_PATH=internal
+	    rpcgen_cflags=-Wstrict-prototypes
 	fi
 	AC_SUBST(RPCGEN_PATH)
 	AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"])
@@ -542,7 +544,7 @@  my_am_cflags="\
  -pipe \
  -Wall \
  -Wextra \
- -Werror=strict-prototypes \
+ $rpcgen_cflags \
  -Werror=missing-prototypes \
  -Werror=missing-declarations \
  -Werror=format=2 \