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 gdb/16014] Coding error: 2 * sizeof( sizeof())


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

--- Comment #2 from dcb <dcb314 at hotmail dot com> ---
>It would be more convenient if you ran cppcheck against cvs head.

Maybe, or you could have a look at the gdb-7.6.1 that I reported
the problems against.

More of a clue for the first one:

    qfn->real_names = OBSTACK_CALLOC (&objfile->objfile_obstack,
                      qfn->num_file_names, sizeof (char *));

I am guessing that removing the mention of sizeof will help.

For the second:

        write_inferior_data_ptr
          (actions_array + i * sizeof (sizeof (*tpoint->actions)),
           ipa_action);

Here another removal of a sizeof looks plausible.

-- 
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]