Re: [PATCH] ptx: avoid new warning/error from upcoming gcc-7.x
From:
Pádraig Brady
Subject:
Re: [PATCH] ptx: avoid new warning/error from upcoming gcc-7.x
Date:
Mon, 29 Aug 2016 11:55:48 +0100
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
On 29/08/16 06:57, Jim Meyering wrote:
> I noticed a new warning/error when building with gcc-built-from-git.
> Here's the fix:
>
> ptx: avoid new warning/error from upcoming gcc-7.x
>
> * src/ptx.c (fix_output_parameters): Switch to an unsigned type that
> matches the OCCURS.file_index type. This avoids the following error
> from gcc-7.0.0 20160829 (experimental):
> src/ptx.c:1220:14: error: assuming signed overflow does not occur \
> when simplifying conditional to constant [-Werror=strict-overflow]
> if (file_index > 0)
>
+1
thanks,
Pádraig