https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119323

            Bug ID: 119323
           Summary: cppcheck meets libgcobol
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I ran the static analyser cppcheck over the source code
of /libgcobol/.

It said many things and I think the most important are the following:

1.

libgcobol/gmath.cc:392:48: performance: Function parameter 'addend' should be
passed by const reference. [passedByValue]

2.

libgcobol/gfileio.cc:2978:12: warning: Identical condition
'ch==file->delimiter', second condition is always false
[identicalConditionAfterEarlyExit]

3.

libgcobol/intrinsic.cc:3969:12: warning: Identical inner 'if' condition is
always true. [identicalInnerCondition]

4.

libgcobol/libgcobol.cc:11072:33: warning: 'operator=' should check for
assignment to self to avoid problems with dynamic memory. [operatorEqToSelf]

5.

libgcobol/common-defs.h:473:7: warning: Struct 'cbl_enabled_exceptions_array_t'
does not have a copy constructor which is recommended since it has dynamic
memory/resource allocation(s). [noCopyConstructor]

Reply via email to