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 sim/18273] sim: various cppcheck warnings


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

--- Comment #7 from Nick Clifton <nickc at redhat dot com> ---
Hi David,

> [src/sim/moxie/interp.c:1250]: (error) Resource leak: f

Not worth bothering with IMHO.

> [src/sim/common/sim-fpu.c:1110]: (style) Unsigned variable 'fraction' can't
> be negative so it is unnecessary to test it.

Fixed by patch.

> [src/sim/erc32/sis.c:205]: (style) Expression is always false because 'else
> if' condition matches previous condition at line 171.

Fixed by patch.

> [src/sim/m68hc11/gencode.c:1469]: (style) Expression is always false because
> 'else if' condition matches previous condition at line 1460.

Possibly a real bug.  I am not familiar enough with the M68HC11 simulator to
know.  For now the patch suppresses the duplicate code, but leaves it present
in the sources with a comment added.

> [src/sim/ppc/hw_htab.c:552] -> [src/sim/ppc/hw_htab.c:552]: (style) Same
> expression on both sides of '>='.

Real bug :-) Fixed by patch.

Cheers
  Nick

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