Fix printing large decimal values in strings.
authorNick Clifton <nickc@redhat.com>
Mon, 10 Jun 2019 14:30:02 +0000 (15:30 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 10 Jun 2019 14:30:02 +0000 (15:30 +0100)
PR 24651
* strings.c (print_strings): Use %u to print unsigned values in
decimal.

binutils/ChangeLog
binutils/strings.c

index b845caca0358759c84807527ba86fd3a09c8ef85..5565bb5708c9d00d9c2f5c3250242523d4345069 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-10  Christos Zoulas  <christos@zoulas.com>
+
+       PR 24651
+       * strings.c (print_strings): Use %u to print unsigned values in
+       decimal.
+
 2019-06-10  Christos Zoulas  <christos@zoulas.com>
 
        PR 24649
index 648bdc081271b2c9c7505066a5622b009cd58437..ea48f92febad42674543baf96980c103f12db2f2 100644 (file)
@@ -633,7 +633,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
            if (sizeof (start) > sizeof (long))
              {
 # ifndef __MSVCRT__
-               printf ("%7lld ", (unsigned long long) start);
+               printf ("%7llu ", (unsigned long long) start);
 # else
                printf ("%7I64d ", (unsigned long long) start);
 # endif
@@ -641,7 +641,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
            else
 #elif !BFD_HOST_64BIT_LONG
              if (start != (unsigned long) start)
-               printf ("++%7ld ", (unsigned long) start);
+               printf ("++%7lu ", (unsigned long) start);
              else
 #endif
                printf ("%7ld ", (long) start);
This page took 0.027067 seconds and 4 git commands to generate.