From a1300c60efef1ee1b9e04d6834cb6d3eda16f31d Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Sat, 16 Dec 2017 13:07:43 -0800 Subject: [PATCH] build: avoid a signed overflow warning in ptx * src/ptx.c (fix_output_parameters): GCC 6.3.1 with ./configure --enable-single-binary would give: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] if (file_index > 0) So change the type of file_index to signed (size_t). --- src/ptx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptx.c b/src/ptx.c index 58e6c57c8a..02bf8ebb04 100644 --- a/src/ptx.c +++ b/src/ptx.c @@ -1194,7 +1194,7 @@ print_field (BLOCK field) static void fix_output_parameters (void) { - int file_index; /* index in text input file arrays */ + size_t file_index; /* index in text input file arrays */ intmax_t line_ordinal; /* line ordinal value for reference */ ptrdiff_t reference_width; /* width for the whole reference */ int character; /* character ordinal */ -- 2.47.2