cppcheck/pyflakes results for osmocom-bb

Holger Hans Peter Freyther holger at freyther.de
Sun Sep 30 12:12:14 UTC 2012


On Sat, Sep 29, 2012 at 07:20:15PM +0800, Paul Wise wrote:
> Hi all,
> 
> ./src/target_dsp/calypso/dump2coff.py:3: 'namedtuple' imported but unused
> ./src/host/fb_tools/bdf_to_c.py:30: 'string' imported but unused

please create a patch for that/these.

> [src/target/firmware/apps/chainload/main.c:39]: (error) Possible null pointer dereference: entry

that is actually the point of the method. :)



> 
> [src/host/layer23/src/common/main.c:146]: (error) Possible null pointer dereference: app_opp

the tool is wrong here. app_opp == NULL iff app_len == 0 (or it should be).



> [src/host/gsmmap/gsmmap.c:379] -> [src/host/gsmmap/gsmmap.c:384]: (error) Possible null pointer dereference: meas - otherwise it is redundant to check it against null.

the code could use do {} while(); instead of while to make the warning go away.

> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1076] -> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1041]: (error) Possible null pointer dereference: dup - otherwise it is redundant to check it against null.
> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1087] -> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1041]: (error) Possible null pointer dereference: dup - otherwise it is redundant to check it against null.
> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1088] -> [src/shared/libosmocore/src/gb/gprs_bssgp.c:1041]: (error) Possible null pointer dereference: dup - otherwise it is redundant to check it against null.
> [src/shared/libosmocore/src/gsm/lapd_core.c:1936] -> [src/shared/libosmocore/src/gsm/lapd_core.c:1948]: (error) Possible null pointer dereference: msg - otherwise it is redundant to check it against null.

propably right, didn't check these.

> [src/target/ui-experiment/png2tiny.c:20]: (error) printf format string has 1 parameters but only 0 are given.

gcc by itself should warn about it.



mtk: probably right but the code is not used on many devices.
> [src/target/firmware/apps/loader/main.c:92]: (error) Possible null pointer dereference: entry
> [src/target/firmware/apps/loader_mtk/main.c:87]: (error) Possible null pointer dereference: entry
> [src/target/firmware/rf/mt6139.c:138]: (error) Uninitialized variable: pga_gain
> 
> -- 
> bye,
> pabs
> 
> http://bonedaddy.net/pabs3/






More information about the baseband-devel mailing list