[commit] ada-typeprint.c (print_range): Initialize lo,hi for gcc -Wall.
Commit Message
Hi.
Just the standard tweak to cope with gcc -Wall.
../../clang/gdb/ada-typeprint.c: In function 'print_range':
../../clang/gdb/ada-typeprint.c:187:23: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized]
ada_print_scalar (target_type, hi, stream);
^
../../clang/gdb/ada-typeprint.c:185:23: error: 'lo' may be used uninitialized in this function [-Werror=maybe-uninitialized]
ada_print_scalar (target_type, lo, stream);
^
cc1: all warnings being treated as errors
2014-08-18 Doug Evans <dje@google.com>
* ada-typeprint.c (print_range): Initialize lo,hi for gcc -Wall.
Comments
> 2014-08-18 Doug Evans <dje@google.com>
>
> * ada-typeprint.c (print_range): Initialize lo,hi for gcc -Wall.
Argh, thanks!
@@ -160,7 +160,7 @@ print_range (struct type *type, struct ui_file *stream,
{
struct type *target_type;
volatile struct gdb_exception e;
- LONGEST lo, hi;
+ LONGEST lo = 0, hi = 0; /* init for gcc -Wall */
target_type = TYPE_TARGET_TYPE (type);
if (target_type == NULL)