This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/17237] New: bug in f-valprint.c


https://sourceware.org/bugzilla/show_bug.cgi?id=17237

            Bug ID: 17237
           Summary: bug in f-valprint.c
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at redhat dot com

-Wunused-but-set-variable shows this in f-valprint.c:

../../binutils-gdb/gdb/f-valprint.c: In function âf_val_printâ:
../../binutils-gdb/gdb/f-valprint.c:347:31: error: variable âoptsâ set but not
used [-Werror=unused-but-set-variable]
    struct value_print_options opts = *options;
                               ^

The code:

      struct value_print_options opts = *options;

      opts.format = (options->format ? options->format
             : options->output_format);
      val_print_scalar_formatted (type, valaddr, embedded_offset,
                      original_value, options, 0, stream);

That last call should probably use &opts rather than options.
This seems like a user-visible bug, albeit a minor one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]