On 10/22/2010 01:23 PM, Jim Meyering wrote:
Paul Eggert wrote:
> From 3a77a23690108e721b8b99f947937bda9026ee07 Mon Sep 17 00:00:00 2001
From: Paul Eggert<[email protected]>
Date: Fri, 22 Oct 2010 11:14:17 -0700
Subject: [PATCH] inttostr: simplify by removing unnecessary redundancy
While looking into the inttostr issues raised recently, I discovered
that an #if would be a bit cleaner if rewritten as an if (as per
Spencer& Collyer's classic paper #ifdef Considered Harmful), and
installed this:
* lib/anytostr.c: Don't include verify.h.
(anytostr): Don't verify that TYPE_SIGNED (inttype) equals
inttype_is_signed. Instead, use TYPE_SIGNED (inttype) directly.
cc1: warnings being treated as errors
In file included from uinttostr.c:4:
anytostr.c: In function 'uinttostr':
anytostr.c:34: error: comparison of unsigned expression< 0 is always
false [-Wtype-limits]
make[4]: *** [uinttostr.o] Error 1
With your change, that warning (and with -Werror, failure) is back.
Can we at least factor things, so that inttype_is_signed is computed
within the body of anytostr.c rather than being a required parameter of
each wrapper? That way, we can still avoid verify, because the
computation and use would reside in the same file.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org