This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix warning in ldbuildid.c mingw32 code
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 27 Jul 2016 09:33:54 -0000
- Subject: [binutils-gdb] Fix warning in ldbuildid.c mingw32 code
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7fca8e8ff70e53aeb5459cbe1438d168d5624958
commit 7fca8e8ff70e53aeb5459cbe1438d168d5624958
Author: Igor Kudrin <ikudrin@accesssoftek.com>
Date: Wed Jul 27 19:01:34 2016 +0930
Fix warning in ldbuildid.c mingw32 code
* ldbuildid.c (generate_build_id): Warning fix.
Diff:
---
ld/ChangeLog | 4 ++++
ld/ldbuildid.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5765509..96486fb 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-07-27 Igor Kudrin <ikudrin@accesssoftek.com>
+
+ * ldbuildid.c (generate_build_id): Warning fix.
+
2016-07-26 Maciej W. Rozycki <macro@imgtec.com>
* testsuite/ld-mips-elf/compressed-plt-1.s: Add branch support.
diff --git a/ld/ldbuildid.c b/ld/ldbuildid.c
index d2dccc5..76a0b9e 100644
--- a/ld/ldbuildid.c
+++ b/ld/ldbuildid.c
@@ -152,7 +152,8 @@ generate_build_id (bfd *abfd,
return FALSE;
}
FreeLibrary (rpc_library);
- memcpy (id_bits, &uuid, size < sizeof (UUID) ? size : sizeof (UUID));
+ memcpy (id_bits, &uuid,
+ (size_t) size < sizeof (UUID) ? (size_t) size : sizeof (UUID));
#endif /* __MINGW32__ */
}
else if (strneq (style, "0x", 2))