From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113496 invoked by alias); 29 Apr 2015 15:06:52 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 113450 invoked by uid 48); 29 Apr 2015 15:06:51 -0000 From: "nickc at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug sim/18273] sim: various cppcheck warnings Date: Wed, 29 Apr 2015 15:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: sim X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nickc at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: vapier at gentoo dot org X-Bugzilla-Target-Milestone: 8.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00182.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18273 --- Comment #7 from Nick Clifton --- 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.