From 853c7bd0f45d3690ed2e770515c45345b31dd60c Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 24 Aug 2002 00:40:59 +0000 Subject: [PATCH] * valprint.c (print_longest) [CC_HAS_LONG_LONG && PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned long long) to prevent compiler warning on 64-bit systems. --- gdb/ChangeLog | 6 ++++++ gdb/valprint.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 750a80298e5..25a0285b7de 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-08-24 Mark Kettenis + + * valprint.c (print_longest) [CC_HAS_LONG_LONG && + PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned + long long) to prevent compiler warning on 64-bit systems. + 2002-08-23 Andrew Cagney * gdbarch.sh (STORE_RETURN_VALUE): Add regcache parameter. diff --git a/gdb/valprint.c b/gdb/valprint.c index f27fd31eb0c..b1c47a123d4 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -332,7 +332,7 @@ print_longest (struct ui_file *stream, int format, int use_local, fprintf_filtered (stream, use_local ? local_decimal_format_custom ("ll") : "%lld", - val_long); + (long long) val_long); break; case 'u': fprintf_filtered (stream, "%llu", (long long) val_long); @@ -341,13 +341,13 @@ print_longest (struct ui_file *stream, int format, int use_local, fprintf_filtered (stream, use_local ? local_hex_format_custom ("ll") : "%llx", - val_long); + (unsigned long long) val_long); break; case 'o': fprintf_filtered (stream, use_local ? local_octal_format_custom ("ll") : "%llo", - val_long); + (unsigned long long) val_long); break; case 'b': fprintf_filtered (stream, local_hex_format_custom ("02ll"), val_long); -- 2.30.2