Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Besides, who knows... compilers may eventually be able to optimize > away that xalloc_die call, in spite of the intermediate size_t. If GCC ever gets that smart, then it will issue the same warning as it does now without the unsigned_int hack. Shouldn't

Re: new warnings in mktime.c

2005-06-22 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> With gcc-4.0 -O -Wall, I get these new warnings: > > Odd; I don't get those warnings with gcc 4.0.0 -O -Wall: > > $ gcc -DHAVE_CONFIG_H -I. -I.. -O -Wall -c mktime.c > $ gcc --version | sed 1q > gcc (GCC) 4.0.0

Re: new warnings in mktime.c

2005-06-22 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > With gcc-4.0 -O -Wall, I get these new warnings: Odd; I don't get those warnings with gcc 4.0.0 -O -Wall: $ gcc -DHAVE_CONFIG_H -I. -I.. -O -Wall -c mktime.c $ gcc --version | sed 1q gcc (GCC) 4.0.0 Anyway, I installed this patch into coreutils. Can y

Re: [patch] who and stale utmp entries

2005-06-22 Thread Paul Eggert
Tim Waugh <[EMAIL PROTECTED]> writes: > I had a bug report that 'who -b' and 'who -r' fail to give output with > this patch. This fixes it: Thanks for reporting that. IS_USER_PROCESS is already defined in readutmp.h, so I installed this simpler patch in both coreutils and gnulib. 2005-06-22 P

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: >> "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote: ... >>> quotearg.c: In function `quotearg_n_options': >>> quotearg.c:586: warning: comparison is always false due to limited range of >>> data type ... > My own experience is that that particular warning is more

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Jim Meyering
Oskar Liljeblad <[EMAIL PROTECTED]> wrote: > On Wednesday, June 22, 2005 at 13:47, Jim Meyering wrote: >> > >> > I get that warning without both -W and -Wall, I think. >> > (gcc 3.3.6) >> >> I've tried with the following versions of gcc on x86_64-unknown-linux-gnu: >> gcc-3.3 (GCC) 3.3.6 (Debian

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Oskar Liljeblad
On Wednesday, June 22, 2005 at 13:47, Jim Meyering wrote: > > > > I get that warning without both -W and -Wall, I think. > > (gcc 3.3.6) > > I've tried with the following versions of gcc on x86_64-unknown-linux-gnu: > gcc-3.3 (GCC) 3.3.6 (Debian 1:3.3.6-6) > gcc-3.4 (GCC) 3.4.5 20050605 (prere

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Jim Meyering
Oskar Liljeblad <[EMAIL PROTECTED]> wrote: > On Wednesday, June 22, 2005 at 11:50, Jim Meyering wrote: ... >> These days, I rarely use -W (and never use it with -Werror), >> for precisely that reason. > > I get that warning without both -W and -Wall, I think. > (gcc 3.3.6) I've tried with the foll

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Oskar Liljeblad
On Wednesday, June 22, 2005 at 11:50, Jim Meyering wrote: > > Isn't that a cure that is worse than the disease? That patch will > > slow down the code on his platform, by causing the compiler to insert > > a run-time check where it now does the check at compile-time (and can > > therefore omit the

new warnings in mktime.c

2005-06-22 Thread Jim Meyering
With gcc-4.0 -O -Wall, I get these new warnings: mktime.c: In function 'ranged_convert': mktime.c:244: warning: 'tm.tm_zone' may be used uninitialized in this function mktime.c:244: warning: 'tm.tm_gmtoff' may be used uninitialized in this function mktime.c:244: warning: 'tm.tm_isdst' may

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote: >>> What's the proper way to fix these warnings? >>> >>> quotearg.c: In function `quotearg_n_options': >>> quotearg.c:586: warning: comparison is always false due to l

Re: xmalloc.c's xcalloc performs unnecessary test for N*S overflow

2005-06-22 Thread Paul Eggert
I installed the following (slightly different) patch for that problem, into gnulib. It's tested with GNU tar. 2005-06-22 Paul Eggert <[EMAIL PROTECTED]> * xmalloc.c (HAVE_GNU_CALLOC): New constant. (xcalloc): Use it to avoid needless tests. Problem reported by Jim Meyer

Re: warning: comparison is always false due to limited range of data type

2005-06-22 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > "Oskar Liljeblad" <[EMAIL PROTECTED]> wrote: >> What's the proper way to fix these warnings? >> >> quotearg.c: In function `quotearg_n_options': >> quotearg.c:586: warning: comparison is always false due to limited range of >> data type > > Paul, if you d