[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sync from gnulib to coreutils
From: |
Jim Meyering |
Subject: |
Re: sync from gnulib to coreutils |
Date: |
Wed, 11 Jan 2006 09:25:03 +0100 |
Paul Eggert <address@hidden> wrote:
> I installed this to sync from gnulib:
>
> 2006-01-10 Paul Eggert <address@hidden>
>
> * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
> Use verify_true instead of verify_expr, to sync with gnulib.
Thanks.
I've installed this additional change:
2006-01-11 Jim Meyering <address@hidden>
* src/system.h (X2NREALLOC): Now that verify_true is no longer
void, cast its result to void, to avoid gcc's warning that
``left-hand operand of comma expression has no effect''.
(DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
Index: src/system.h
===================================================================
RCS file: /fetish/cu/src/system.h,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -p -u -r1.140 -r1.141
--- src/system.h 10 Jan 2006 17:47:57 -0000 1.140
+++ src/system.h 11 Jan 2006 08:22:34 -0000 1.141
@@ -513,14 +513,15 @@ uid_t getuid ();
the third argument to x2nrealloc would be `sizeof *(P)'.
Ensure that sizeof *(P) is *not* 1. In that case, it'd be
better to use X2REALLOC, although not strictly necessary. */
-#define X2NREALLOC(P, PN) (verify_true (sizeof *(P) != 1), \
+#define X2NREALLOC(P, PN) ((void) verify_true (sizeof *(P) != 1), \
x2nrealloc (P, PN, sizeof *(P)))
/* Using x2realloc (when appropriate) usually makes your code more
readable than using x2nrealloc, but it also makes it so your
code will malfunction if sizeof *(P) ever becomes 2 or greater.
So use this macro instead of using x2realloc directly. */
-#define X2REALLOC(P, PN) (verify_true (sizeof *(P) == 1), x2realloc (P, PN))
+#define X2REALLOC(P, PN) ((void) verify_true (sizeof *(P) == 1), \
+ x2realloc (P, PN))
#if ! defined HAVE_MEMPCPY && ! defined mempcpy
/* Be CAREFUL that there are no side effects in N. */
@@ -800,8 +801,8 @@ ptr_align (void const *ptr, size_t align
#define DECIMAL_DIGIT_ACCUMULATE(Accum, Digit_val, Type) \
( \
(void) (&(Accum) == (Type *) NULL), /* The type matches. */ \
- verify_true (! TYPE_SIGNED (Type)), /* The type is unsigned. */ \
- verify_true (sizeof (Accum) == sizeof (Type)), /* Added check. */ \
+ (void) verify_true (! TYPE_SIGNED (Type)), /* The type is unsigned. */ \
+ (void) verify_true (sizeof (Accum) == sizeof (Type)), /* Added check. */ \
(((Type) -1 / 10 < (Accum) \
|| (Type) ((Accum) * 10 + (Digit_val)) < (Accum)) \
? false : (((Accum) = (Accum) * 10 + (Digit_val)), true)) \