icoutils/0023-wrestool-restable.c-Use-size_t-when-counting-array-e.patch
Richard W.M. Jones 86a1ed311e Add a series of upstream patches to enable compiler warnings and
fix multiple issues.

Revert one of the checks which breaks processing of PE binaries.

Removed the 'Group' line, not needed with modern Fedora/RPM.
2017-03-10 12:18:04 +00:00

38 lines
1.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 101f6c7c87003fa0d20f25a7c17e42a008e38d47 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 9 Mar 2017 15:06:46 +0000
Subject: [PATCH 23/26] wrestool/restable.c: Use size_t when counting array
elements.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Original warning from GCC:
restable.c: In function list_resources:
restable.c:343:2: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
for (c = 0 ; c < rescnt ; c++) {
^~~
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
wrestool/restable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wrestool/restable.c b/wrestool/restable.c
index 4a9f36a..8226806 100644
--- a/wrestool/restable.c
+++ b/wrestool/restable.c
@@ -318,7 +318,7 @@ list_ne_name_resources (WinLibrary *fi, WinResource *typeres, int *count)
static WinResource *
list_ne_type_resources (WinLibrary *fi, int *count)
{
- int c, rescnt;
+ size_t c, rescnt;
WinResource *wr;
Win16NETypeInfo *typeinfo;
--
2.10.2