diff mbox

Added more compile warning options

Message ID 1350939654-25126-1-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson Oct. 22, 2012, 9 p.m. UTC
To ensure the code compiles cleaner, the following warning options
are now set
    -Wall -Wextra -Wstrict-prototypes -Wstrict-aliasing
    -Wconversion -Wsign-conversion -Wmissing-prototypes
    -Wsign-conversion -pedantic -Wmissing-prototypes

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Jim Rees Oct. 22, 2012, 9:43 p.m. UTC | #1
Steve Dickson wrote:

  To ensure the code compiles cleaner, the following warning options
  are now set
      -Wall -Wextra -Wstrict-prototypes -Wstrict-aliasing
      -Wconversion -Wsign-conversion -Wmissing-prototypes
      -Wsign-conversion -pedantic -Wmissing-prototypes

You only need to specify them once.  You've got sign-conversion and
missing-prototypes twice.  Also I think -pedantic is going too far.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Steve Dickson Oct. 23, 2012, 2:45 p.m. UTC | #2
Hey Jim,

On 22/10/12 17:43, Jim Rees wrote:
> Steve Dickson wrote:
> 
>   To ensure the code compiles cleaner, the following warning options
>   are now set
>       -Wall -Wextra -Wstrict-prototypes -Wstrict-aliasing
>       -Wconversion -Wsign-conversion -Wmissing-prototypes
>       -Wsign-conversion -pedantic -Wmissing-prototypes
> 
> You only need to specify them once.  You've got sign-conversion and
> missing-prototypes twice.  
Yeah... I noticed that after I posted the patch... This was more
of an RFC patch than anything... I just wanted to get people's opinion...

> Also I think -pedantic is going too far.
Why? The one patch its used for does the following:

-gss_OID g_mechOid = GSS_C_NULL_OID;;
+gss_OID g_mechOid = GSS_C_NULL_OID;

Which seems reasonable... What do you see that I don't?

steved.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index a174bf4..197823f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -448,7 +448,11 @@  case $host in
     ARCHFLAGS="" ;;
 esac
 
-my_am_cflags="-Wall -Wextra -Wstrict-prototypes $ARCHFLAGS -pipe"
+WFLAGS="-Wall -Wextra -Wstrict-prototypes -Wstrict-aliasing \
+	-Wconversion -Wsign-conversion -Wmissing-prototypes \
+	-Wsign-conversion -pedantic -Wmissing-prototypes"
+
+my_am_cflags="$WFLAGS $ARCHFLAGS -pipe"
 
 AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])