From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCC15385136B; Thu, 15 Dec 2022 20:04:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCC15385136B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671134688; bh=7HPSAoNrCPohQhzhXOA8GX4zlqcUTXbfSV0//BxBioY=; h=From:To:Subject:Date:From; b=ANgKCWD0IPEo3gYrT6hhTp1NVTC7dmFf5ZFdmcm8MC5fauKPmyI3HlpJZFr3P18rQ REAPMB0eXiAcgTpnp3DP9+02IT3mJZ6BiH0Y1mt9gDcwbcgD3RWxfbYpyPEMx11Z81 HgOeiw2+YYQyhjGIBqatkyUFZVvH89JP/JX9aOeQ= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108136] New: Modula2 meets cppcheck Date: Thu, 15 Dec 2022 20:04:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108136 Bug ID: 108136 Summary: Modula2 meets cppcheck Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- I ran the C/C++ static analyser cppcheck over the source code of the Modula2 compiler and library. For errors, this one might be significant: trunk.d1/gcc/m2/pge-boot/GRTco.c:113:1: error: Found an exit path from func= tion with non-void return type that has missing return statement [missingReturn] For style: trunk.d1/gcc/m2/mc-boot/GM2Dependent.c:453:15: style: Array index 'i' is us= ed before limits check. [arrayIndexThenCheck] trunk.d1/gcc/m2/pge-boot/GM2Dependent.c:461:15: style: Array index 'i' is u= sed before limits check. [arrayIndexThenCheck] trunk.d1/gcc/m2/mc-boot/GArgs.c:86:42: style: Array index 'j' is used before limits check. [arrayIndexThenCheck] trunk.d1/gcc/m2/pge-boot/GArgs.c:84:42: style: Array index 'j' is used befo= re limits check. [arrayIndexThenCheck] trunk.d1/gcc/m2/mc-boot/Gkeyc.c:603:241: style: Same expression 'seenUIntMa= x' found multiple times in chain of '||' operators. [duplicateExpression] trunk.d1/gcc/m2/mc-boot/Gkeyc.c:603:128: style: Same expression 'seenUIntMi= n' found multiple times in chain of '||' operators. [duplicateExpression] for performance, relatively little: trunk.d1/gcc/m2/mc-boot/Gdecl.c:14011:58: performance: Function parameter '= s' should be passed by const reference. [passedByValue] trunk.d1/gcc/m2/mc-boot/Gdecl.c:16906:57: performance: Function parameter '= s' should be passed by const reference. [passedByValue] trunk.d1/gcc/m2/mc-boot/Gdecl.c:16918:64: performance: Function parameter '= s' should be passed by const reference. [passedByValue]=