findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Findutils-patches] [PATCH] 2007-06-26 James Youngman <address@hidde


From: Eric Blake
Subject: Re: [Findutils-patches] [PATCH] 2007-06-26 James Youngman <address@hidden>
Date: Sat, 30 Jun 2007 13:35:24 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666

According to James Youngman on 6/26/2007 2:20 PM:
> @@ -2025,7 +2026,7 @@ format_date (struct timespec ts, int kind)
>     * demonstrating that the performance difference is actually
>     * measurable.
>     */
> -  assert (sizeof(buf) >= LONGEST_HUMAN_READABLE);
> +  verify_true (sizeof(buf) >= LONGEST_HUMAN_READABLE);

This change introduces a gcc warning:
pred.c: In function `format_date':
pred.c:2032: warning: statement with no effect

Either we need to explicitly cast it to void, or change to using verify()
instead of verify_true().  I'm doing the latter as follows, as part of my
patch to remove gcc compiler warnings.

Index: find/pred.c
===================================================================
RCS file: /sources/findutils/findutils/find/pred.c,v
retrieving revision 1.102
diff -u -p -r1.102 pred.c
--- find/pred.c 30 Jun 2007 13:15:33 -0000      1.102
+++ find/pred.c 30 Jun 2007 19:32:27 -0000
@@ -2026,7 +2026,7 @@ format_date (struct timespec ts, int kin
    * demonstrating that the performance difference is actually
    * measurable.
    */
-  verify_true (sizeof(buf) >= LONGEST_HUMAN_READABLE);
+  verify (sizeof(buf) >= LONGEST_HUMAN_READABLE);

   charsprinted = 0;
   need_ns_suffix = 0;


-- 
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]