Fix signedness warning
authorJan-Benedict Glaw <jbglaw@getslash.de>
Wed, 19 Nov 2014 13:13:30 +0000 (14:13 +0100)
committerJan-Benedict Glaw <jbglaw@getslash.de>
Wed, 19 Nov 2014 13:13:30 +0000 (14:13 +0100)
This is the updated version using uintptr_t as Alan Modra suggested.

2014-11-18  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* dwarf.c (process_extended_line_op): Fix signedness warning.

binutils/ChangeLog
binutils/dwarf.c

index 7aa8ad61b0a92c84619d2f48bc513f01e5c8e602..9d3fbc1270aa8a7d3fb2117222ee3edd62c6962d 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-18  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+       * dwarf.c (process_extended_line_op): Fix signedness warning.
+
 2014-11-18  Nick Clifton  <nickc@redhat.com>
 
        PR binutuls/17605
index e1e2b350f0ee8bef1bd6fb8260ebd05ecf188bb6..7f3a568e8134ccb524facc7d172e6d3b32856d84 100644 (file)
@@ -416,7 +416,7 @@ process_extended_line_op (unsigned char * data,
   len = read_uleb128 (data, & bytes_read, end);
   data += bytes_read;
 
-  if (len == 0 || data == end || len > (end - data))
+  if (len == 0 || data == end || len > (uintptr_t) (end - data))
     {
       warn (_("Badly formed extended line op encountered!\n"));
       return bytes_read;