coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more compile warnings with new factor


From: Jim Meyering
Subject: Re: more compile warnings with new factor
Date: Tue, 23 Oct 2012 11:44:35 +0200

Pádraig Brady wrote:
> On 10/23/2012 08:46 AM, Jim Meyering wrote:
...
>> When configured with gcc and --enable-gcc-warnings we enable -Werror,
>> to ensure that no warnings slip by unnoticed.
>> That is not the default, though I'm tempted to make it
>> the default when building from git.
>
> Already the case since 47fd706, hence why a little more important to clean up.

Thanks for the reminder.  Eric enabled that for coreutils, already.
I knew he'd done it for libvirt.  I even ACK'd it for coreutils.
The problem for me was that the same hadn't been done for other projects
I tend, so I always use --enable-gcc-warnings and thus hadn't noticed the
difference.

This is a good reason to enable that consistently.  Eric, since the
log (modulo small edits) and patch are yours, you're the author, so I'll
wait for your ACK before pushing these to their respective repositories.
In order, those are:

  grep
  diffutils
  idutils
  cppi
  parted

The logs are identical, as are the patches, modulo offsets.

>From 85eaa86258bbdc17894355a1720dc9efda9044ed Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:30:29 +0200
Subject: [PATCH] build: default to --enable-gcc-warnings in a git tree

Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful.  Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a6168c7..1e51ffc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,11 @@ AC_ARG_ENABLE([gcc-warnings],
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
    esac
    gl_gcc_warnings=$enableval],
-  [gl_gcc_warnings=no]
+  [if test -d "$srcdir"/.git; then
+     gl_gcc_warnings=yes
+   else
+     gl_gcc_warnings=no
+   fi]
 )

 if test "$gl_gcc_warnings" = yes; then
--
1.8.0

>From 01d92dba155d9ad87eaf0378876e0c67285c2075 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:06:48 +0200
Subject: [PATCH] build: default to --enable-gcc-warnings in a git tree

Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful.  Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d6e52c4..18ff554 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,11 @@ AC_ARG_ENABLE([gcc-warnings],
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
    esac
    gl_gcc_warnings=$enableval],
-  [gl_gcc_warnings=no]
+  [if test -d "$srcdir"/.git; then
+     gl_gcc_warnings=yes
+   else
+     gl_gcc_warnings=no
+   fi]
 )

 if test "$gl_gcc_warnings" = yes; then
--
1.8.0

>From a6211c988649214a6cfaa10ba13d77b8e65a8fff Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:08:51 +0200
Subject: [PATCH] build: default to --enable-gcc-warnings in a git tree

Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful.  Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4716744..b80a85d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,11 @@ AC_ARG_ENABLE([gcc-warnings],
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
    esac
    gl_gcc_warnings=$enableval],
-  [gl_gcc_warnings=no]
+  [if test -d "$srcdir"/.git; then
+     gl_gcc_warnings=yes
+   else
+     gl_gcc_warnings=no
+   fi]
 )

 if test "$gl_gcc_warnings" = yes; then
--
1.8.0

>From 27a0e658f90a39b7f85371918486738306f8b11d Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:08:17 +0200
Subject: [PATCH] build: default to --enable-gcc-warnings in a git tree

Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful.  Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7897f5b..81e5fbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,11 @@ AC_ARG_ENABLE([gcc-warnings],
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
    esac
    gl_gcc_warnings=$enableval],
-  [gl_gcc_warnings=no]
+  [if test -d "$srcdir"/.git; then
+     gl_gcc_warnings=yes
+   else
+     gl_gcc_warnings=no
+   fi]
 )

 if test "$gl_gcc_warnings" = yes; then
--
1.8.0

>From d3a81337ff149294b7cf63c45a61ffa24fa542c5 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 23 Oct 2012 11:07:29 +0200
Subject: [PATCH] build: default to --enable-gcc-warnings in a git tree

Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful.  Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 832fc20..417f325 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,7 +187,11 @@ AC_ARG_ENABLE([gcc-warnings],
      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
    esac
    gl_gcc_warnings=$enableval],
-  [gl_gcc_warnings=no]
+  [if test -d "$srcdir"/.git; then
+     gl_gcc_warnings=yes
+   else
+     gl_gcc_warnings=no
+   fi]
 )

 if test "$gl_gcc_warnings" = yes; then
--
1.8.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]