Opened 7 years ago

Closed 7 years ago

#6722 closed defect (fixed)

marfa driver issues

Reported by: Kurt Schwehr Owned by: Lucian Plesea
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

The driver could use some linting. e.g.

BASE=marfa_dataset; make $BASE.lo && cppcheck --enable=all --std=c++03 $BASE.cpp
make: `marfa_dataset.lo' is up to date.
Checking marfa_dataset.cpp...
[marfa_dataset.cpp:611]: (style) C-style pointer casting
[marfa_dataset.cpp:614]: (style) C-style pointer casting
[marfa_dataset.cpp:630]: (style) C-style pointer casting
[marfa_dataset.cpp:654]: (style) C-style pointer casting
[marfa_dataset.cpp:1434]: (style) C-style pointer casting
[marfa_dataset.cpp:772]: (style) The scope of the variable 'start_idx' can be reduced.
[marfa_dataset.cpp:772]: (style) The scope of the variable 'end_idx' can be reduced.
[marfa_dataset.cpp:301]: (style) Throwing a copy of the caught exception instead of rethrowing the original exception.
[marfa_dataset.cpp:298]: (style) Exception should be caught by reference.
[marfa_dataset.cpp:403]: (style) Exception should be caught by reference.
[marfa_dataset.cpp:1706]: (style) Exception should be caught by reference.
[marfa_dataset.cpp:2017]: (performance) Prefer prefix ++/-- operators for non-primitive types.
BASE=mrf_util; make $BASE.lo && cppcheck --enable=all --std=c++03 $BASE.cpp
make: `mrf_util.lo' is up to date.
Checking mrf_util.cpp...
[SNIP]
[mrf_util.cpp:163]: (error) Resource leak: fp
Checking mrf_util.cpp: unused...

etc.

Change History (1)

comment:1 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

Except the C-style cast and scope, all other issues have been fixed with the new scripts/cppcheck.sh . Closing.

Note: See TracTickets for help on using tickets.