aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-08-24 00:40:59 +0000
committerMark Kettenis <kettenis@gnu.org>2002-08-24 00:40:59 +0000
commit853c7bd0f45d3690ed2e770515c45345b31dd60c (patch)
treee4bc92d34c9f53649cd12b5890d22fa5b166f8d6 /gdb/valprint.c
parentebba8386192596108670c6d24b4b3f83a2f81cb0 (diff)
downloadgdb-853c7bd0f45d3690ed2e770515c45345b31dd60c.zip
gdb-853c7bd0f45d3690ed2e770515c45345b31dd60c.tar.gz
gdb-853c7bd0f45d3690ed2e770515c45345b31dd60c.tar.bz2
* 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.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index f27fd31..b1c47a1 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);