Re: two small patches to accommodate -Wstrict-overflow

2011-06-04 Thread Bruno Haible
Jim Meyering wrote: > I've reported this one with a minimal test case: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49234 And I've reported the other one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49283 Bruno -- In memoriam Mordechai Gebirtig

Re: two small patches to accommodate -Wstrict-overflow

2011-06-04 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> I've reported this one with a minimal test case: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49234 > > And I've reported the other one: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49283 Thanks!

Re: two small patches to accommodate -Wstrict-overflow

2011-05-30 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> diff --git a/lib/trim.c b/lib/trim.c >> index 1f4d0c1..6515cfa 100644 >> --- a/lib/trim.c >> +++ b/lib/trim.c >> @@ -65,7 +65,7 @@ trim2 (const char *s, int how) >>/* Trim trailing whitespaces. */ >>if (how != TRIM_LEADING) >> {

Re: two small patches to accommodate -Wstrict-overflow

2011-05-29 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > > Jim Meyering wrote: >> diff --git a/lib/trim.c b/lib/trim.c >> index 1f4d0c1..6515cfa 100644 >> --- a/lib/trim.c >> +++ b/lib/trim.c >> @@ -65,7 +65,7 @@ trim2 (const char *s, int how) >>/* Trim trailing whitespaces. */ >>if (how != TRIM_LEADING) >

Re: two small patches to accommodate -Wstrict-overflow

2011-05-29 Thread Bruno Haible
Hi Jim, > diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y > index d77955f..23a9a41 100644 > --- a/lib/parse-datetime.y > +++ b/lib/parse-datetime.y > @@ -1119,7 +1119,7 @@ yylex (YYSTYPE *lvalp, parser_control *pc) > >            do >              { > -              if (p < buff + sizeof

Re: two small patches to accommodate -Wstrict-overflow

2011-05-29 Thread Bruno Haible
Hi Jim, Jim Meyering wrote: > diff --git a/lib/trim.c b/lib/trim.c > index 1f4d0c1..6515cfa 100644 > --- a/lib/trim.c > +++ b/lib/trim.c > @@ -65,7 +65,7 @@ trim2 (const char *s, int how) >/* Trim trailing whitespaces. */ >if (how != TRIM_LEADING) > { > - int stat

two small patches to accommodate -Wstrict-overflow

2011-05-29 Thread Jim Meyering
I won't do much for -Wstrict-overflow, but so far, not much has been required to get close to warning-free. >From 244906802a300a1744de8881857a3a2897b3db8b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 28 May 2011 16:00:20 +0200 Subject: [PATCH 1/2] trim: avoid a warning from -O2 -Wstrict