aboutsummaryrefslogtreecommitdiff
path: root/binutils/resbin.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-05-10 12:41:56 +0100
committerNick Clifton <nickc@redhat.com>2022-05-10 12:41:56 +0100
commitb773a1808d5ae1786cd62a985093cf3f9537f2e2 (patch)
treeb3143456e3ab12d5368c0549cd57bc1625773e90 /binutils/resbin.c
parent83bec4829b6ed5819b0a7b951bc172e7461fb1f4 (diff)
downloadgdb-b773a1808d5ae1786cd62a985093cf3f9537f2e2.zip
gdb-b773a1808d5ae1786cd62a985093cf3f9537f2e2.tar.gz
gdb-b773a1808d5ae1786cd62a985093cf3f9537f2e2.tar.bz2
Fix compiling binutils/resbin.c with Clang version 14
Diffstat (limited to 'binutils/resbin.c')
-rw-r--r--binutils/resbin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/binutils/resbin.c b/binutils/resbin.c
index f4df65c..aa5b1c9 100644
--- a/binutils/resbin.c
+++ b/binutils/resbin.c
@@ -54,7 +54,7 @@ static rc_res_resource *bin_to_res_group_cursor (windres_bfd *, const bfd_byte *
static rc_res_resource *bin_to_res_group_icon (windres_bfd *, const bfd_byte *, rc_uint_type);
static rc_res_resource *bin_to_res_version (windres_bfd *, const bfd_byte *, rc_uint_type);
static rc_res_resource *bin_to_res_userdata (windres_bfd *, const bfd_byte *, rc_uint_type);
-static rc_res_resource *bin_to_res_toolbar (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_toolbar (windres_bfd *, const bfd_byte *);
static void get_version_header (windres_bfd *, const bfd_byte *, rc_uint_type, const char *,
unichar **, rc_uint_type *, rc_uint_type *, rc_uint_type *,
rc_uint_type *);
@@ -105,7 +105,7 @@ bin_to_res (windres_bfd *wrbfd, rc_res_id type, const bfd_byte *data,
case RT_VERSION:
return bin_to_res_version (wrbfd, data, length);
case RT_TOOLBAR:
- return bin_to_res_toolbar (wrbfd, data, length);
+ return bin_to_res_toolbar (wrbfd, data);
}
}
@@ -1216,7 +1216,7 @@ bin_to_res_userdata (windres_bfd *wrbfd ATTRIBUTE_UNUSED, const bfd_byte *data,
}
static rc_res_resource *
-bin_to_res_toolbar (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
+bin_to_res_toolbar (windres_bfd *wrbfd, const bfd_byte *data)
{
rc_toolbar *ri;
rc_res_resource *r;
@@ -1229,7 +1229,6 @@ bin_to_res_toolbar (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt
ri->items = NULL;
data += 12;
- length -= 12;
for (i=0 ; i < ri->nitems; i++)
{
rc_toolbar_item *it;
@@ -1238,7 +1237,6 @@ bin_to_res_toolbar (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt
it->id.u.id = (int) windres_get_32 (wrbfd, data, 4);
it->prev = it->next = NULL;
data += 4;
- length -= 4;
if(ri->items) {
rc_toolbar_item *ii = ri->items;
while (ii->next != NULL)