Opened 14 years ago

Last modified 9 years ago

#1325 new defect

DebCheck QA: Uninitialized variables

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Compiling Version: 6.4.0
Keywords: i.ortho.photo, lib/cdhc, lib/gis/gdal.c, r.terraflow, v.delaunay2 Cc:
CPU: Unspecified Platform: Linux

Description

Hi,

Debian's run of the Cpp check tool automatically found a number of C-code errors (or potential errors) which need to be reviewed by hand. See grass-dev ML thread of 13 Jan 2011.

about: Cppcheck is a command-line tool that tries to detect bugs that your C/C++ compiler doesn't see. It is versatile, and can check non-standard code including various compiler extensions, inline assembly code, etc. Its internal preprocessor can handle includes, macros, and several preprocessor commands. While Cppcheck is highly configurable, you can start using it just by giving it a path to the source code.

http://www.linuxjournal.com/content/daca-could-mean-less-bugs-debian

the list of probably-bugs in the 6.4.0 C/C++ code:

http://qa.debian.org/daca/cppcheck/squeeze/grass_6.4.0~rc6+42329-3.html

CLI analysis program (not Debian specific):

http://cppcheck.wiki.sourceforge.net

I have split those 154 hits into 16 classes, and will report each class in an individual bug report.

Run against releasebranch6_4 r42329 (including all patches up to, but not beyond, 6.4.0-final)


This bug report is for: Uninitialized variables

  • ./imagery/i.ortho.photo/photo.rectify/ps_cp.c:53 [error] - Uninitialized variable: msg
  • ./imagery/i.ortho.photo/photo.rectify/ps_cp.c:58 [error] - Uninitialized variable: msg
  • ./lib/cdhc/enormp.c:51 [error] - Uninitialized variable: x4
  • ./lib/gis/gdal.c:58 [error] - Uninitialized variable: sym
  • ./raster/r.terraflow/sweep.cc:158 [error] - Uninitialized variable: flowpq
  • ./vector/v.delaunay2/geometry.c:254 [error] - Uninitialized variable: v_n_o_b
  • ./vector/v.delaunay2/geometry.c:255 [error] - Uninitialized variable: v_n_d_b
  • ./vector/v.delaunay2/geometry.c:257 [error] - Uninitialized variable: v_n_o_b
  • ./vector/v.delaunay2/geometry.c:257 [error] - Uninitialized variable: v_n_d_b
  • ./vector/v.delaunay2/geometry.c:291 [error] - Uninitialized variable: v_p_o_b
  • ./vector/v.delaunay2/geometry.c:292 [error] - Uninitialized variable: v_p_d_b
  • ./vector/v.delaunay2/geometry.c:294 [error] - Uninitialized variable: v_p_o_b
  • ./vector/v.delaunay2/geometry.c:294 [error] - Uninitialized variable: v_p_d_b

Modules: i.ortho.photo, lib/cdhc, lib/gis/gdal.c, r.terraflow, v.delaunay2

thanks, Hamish

Change History (4)

comment:1 by hamish, 12 years ago

Milestone: 6.4.26.4.4

comment:2 by hamish, 10 years ago

Milestone: 6.4.46.4.5

comment:3 by martinl, 9 years ago

Milestone: 6.4.5

Ticket retargeted after milestone closed

comment:4 by martinl, 9 years ago

Milestone: 6.4.6
Note: See TracTickets for help on using tickets.