X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com Message-ID: <5353C7A1.5070500@gmx.de> Date: Sun, 20 Apr 2014 15:12:01 +0200 From: Juan Manuel Guerrero User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: [PATCH] fix library build for -Werror References: <5352F0CD DOT 7000001 AT gmx DOT de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Y0A3hqVuqoE2sukQ7dvMDDcwqgsJITf0ECrg+YGWzu97vLoQ2c+ yqzEXakuHVGsvzJGUpoPCGWEiMw2xfxk7wGtb9fiX7G7IvXDlmEzJ/HDALCubzLlv/hAtaL 7tcfjhesPf5yzXP/9rVUrdkNXDOM3DjTadtBBpjYj1WfvSaV5DEdRImY+z37fAVzQJFR3aF IcD0OChbqZoY18XDEjHHw== Reply-To: djgpp-workers AT delorie DOT com Am 20.04.2014 07:37, schrieb Ozkan Sezer: > On 4/20/14, Juan Manuel Guerrero 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. Committed patch below. Did the perl fix work for you? Regards, Juan M. Guerrero 2014-04-20 Juan Manuel Guerrero * djgpp/zoneinfo/src/localtime.c: Fix warning: comparison is always false due to limited range of data type. From Ozkan Sezer Logging in to :pserver:anonymous AT cvs DOT delorie DOT com:2401/cvs/djgpp Index: djgpp/zoneinfo/src/localtime.c =================================================================== RCS file: /cvs/djgpp/djgpp/zoneinfo/src/localtime.c,v retrieving revision 1.5 diff -p -U 5 -r1.5 localtime.c --- djgpp/zoneinfo/src/localtime.c 17 Aug 2013 21:04:13 -0000 1.5 +++ djgpp/zoneinfo/src/localtime.c 20 Apr 2014 12:57:48 -0000 @@ -342,11 +342,11 @@ static int differ_by_repeat(const time_t t1, const time_t t0) { 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 tzload(register const char *name, register struct state *const sp, register const int doextend)