delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/20/02:04:40

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=WT+IWKyF8jP9yRHHF3GIoXCMfyECnAPeiFNWWU7pP18=;
b=HwKYN06NILP3TltcKVkVO+6B1ht03LXIwpr7vGPnpaj4A90hmsPGPZchCQxzp+26Q7
RTznrX55n9FJRIkxC612Xz1xxq8mko/vXfD1ThlBnPrEbGBaX/nWHRwW04IM17U0GlrX
D/T6DjDTBfoMj3wr9MaSW+lsEhPZYfojMtYtglzpDcXoPCsmeSCUPqXxIcNpQHPOYG1W
eBqoG3LI1BAziI46Wd0MWTcaxUVJmo62VYtAunCAy0i8gfil+HZtEhmdx1FyX4ZTJqtC
vkeU4dlbvzV9tZYlE1+VaA665Vivohf7iYjvx4LRn2/U2jtuE/Lcn0qVIGfC14zi8gl9
Y/zw==
MIME-Version: 1.0
X-Received: by 10.50.49.44 with SMTP id r12mr14201969ign.41.1397972248593;
Sat, 19 Apr 2014 22:37:28 -0700 (PDT)
In-Reply-To: <5352F0CD.7000001@gmx.de>
References: <CAA2C=vBEXS=7Dp2yPwtv1noVt8FC3QGyczRyw8-uipyNscp9jg AT mail DOT gmail DOT com>
<5352F0CD DOT 7000001 AT gmx DOT de>
Date: Sun, 20 Apr 2014 08:37:28 +0300
Message-ID: <CAA2C=vCaEcLBRn=-dYQZb4P5dSmQuBpUZpmh-Bd922BCFFiJnQ@mail.gmail.com>
Subject: Re: [PATCH] fix library build for -Werror
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp-workers AT delorie DOT com
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 4/20/14, Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de> wrote:
[snip]
>      * djgpp/src/libc/ansi/time/ctime.c:  Fix warning: comparison is always
> false due to limited range of data type.

zoneinfo/src/localtime.c needs the same adjustment (failed
mentioning this before, because it didn't stop the build.)

Index: zoneinfo/src/localtime.c
===================================================================
RCS file: /cvs/djgpp/djgpp/zoneinfo/src/localtime.c,v
retrieving revision 1.5
diff -u -p -r1.5 localtime.c
--- zoneinfo/src/localtime.c	17 Aug 2013 21:04:13 -0000	1.5
+++ zoneinfo/src/localtime.c	20 Apr 2014 05:33:28 -0000
@@ -344,7 +344,7 @@ differ_by_repeat(const time_t t1, const
 	if (TYPE_INTEGRAL(time_t) &&
 		TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS)
 			return 0;
-	return t1 - t0 == SECSPERREPEAT;
+	return (int_fast64_t)t1 - (int_fast64_t)t0 == SECSPERREPEAT;
 }

 static int

--
O.S.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019