summaryrefslogtreecommitdiff
path: root/gl/lib/regex_internal.c.diff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-27 12:06:43 +0100
committerJim Meyering <meyering@redhat.com>2009-10-29 08:14:42 +0100
commitf2859424cbdf23f6673fd4f3a9d7a5b197e0595e (patch)
treef3749cf82212c649c7b759e70aea553eee5b8f20 /gl/lib/regex_internal.c.diff
parent56a66d78ffdaa62426dd5efb57219cb2444ba34c (diff)
downloadcoreutils-f2859424cbdf23f6673fd4f3a9d7a5b197e0595e.tar.xz
build (--enable-gcc-warnings): enable gcc's -Werror also in lib/
* configure.ac (GNULIB_WARN_CFLAGS): Define. * lib/Makefile.am (AM_CFLAGS): Use $(GNULIB_WARN_CFLAGS) rather than $(WARN_CFLAGS) and add $(WERROR_CFLAGS). * gl/lib/regcomp.c.diff: New file. * gl/lib/regex_internal.c.diff: New file. * gl/lib/regexec.c.diff: New file.
Diffstat (limited to 'gl/lib/regex_internal.c.diff')
-rw-r--r--gl/lib/regex_internal.c.diff25
1 files changed, 25 insertions, 0 deletions
diff --git a/gl/lib/regex_internal.c.diff b/gl/lib/regex_internal.c.diff
new file mode 100644
index 000000000..2cede3c07
--- /dev/null
+++ b/gl/lib/regex_internal.c.diff
@@ -0,0 +1,25 @@
+diff --git a/lib/regex_internal.c b/lib/regex_internal.c
+index 904b88e..61c8d9d 100644
+--- a/lib/regex_internal.c
++++ b/lib/regex_internal.c
+@@ -18,6 +18,8 @@
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
++#include "verify.h"
++#include "intprops.h"
+ static void re_string_construct_common (const char *str, Idx len,
+ re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
+@@ -1390,7 +1392,10 @@ static void
+ internal_function
+ re_node_set_remove_at (re_node_set *set, Idx idx)
+ {
+- if (idx < 0 || idx >= set->nelem)
++ verify (! TYPE_SIGNED (Idx));
++ /* if (idx < 0)
++ return; */
++ if (idx >= set->nelem)
+ return;
+ --set->nelem;
+ for (; idx < set->nelem; idx++)