[scan-build] Dereference of null pointer (maybe)

Access to field 'object' results in a dereference of a null pointer
(loaded from variable 'cp')
File: /home/hb/from-git/dia/lib/autoroute.c
Line: 276
[scan-build] Dereference of null pointer (maybe)

Access to field 'len' results in a dereference of a null pointer
(loaded from variable 'p1')
File: /home/hb/from-git/dia/lib/diapathrenderer.c
Line: 887
[scan-build] Dereference of null pointer (maybe)

Access to field 'len' results in a dereference of a null pointer
(loaded from field 'pathes')
File: /home/hb/from-git/dia/lib/diapathrenderer.c
Line: 870
[scan-build] Dereference of null pointer (probably not)

Make a superfluous check for Any!=NULL a g_return_val_if_fail()
otherwise the static analysis assumes Any could be NULL in this
function an will later complain about the missing check. But
we are never putting NULL into the list of items.

Access to field 'type' results in a dereference of a null pointer
(loaded from variable 'Any')
File: /home/hb/from-git/dia/plug-ins/vdx/vdx-import.c
Line: 1822
[scan-build] Fix potential memory leak

Value stored to 'renderer' during its initialization is never read
File: /home/hb/from-git/dia/lib/diaimportrenderer.c
Line: 142

A user of DiaImportRenderer which would not call
dia_import_renderer_get_objects() after importing the data would
have leaked all the objects.
[scan-build] Dead initialization (harmless)

Value stored to 'extra' during its initialization is never read
File: /home/hb/from-git/dia/lib/prop_sdarray_widget.c
Line: 524
-> removed variable and it's initialization

Value stored to 'elem' during its initialization is never read
File: /home/hb/from-git/dia/objects/Misc/n_gon.c
Line: 191
-> use it a little below, rather than calculating the pointer once more

Value stored to 'otype' during its initialization is never read
File: /home/hb/from-git/dia/plug-ins/svg/svg-import.c
Line: 893
-> remove intialization

Value stored to 'renderer' during its initialization is never read
File: /home/hb/from-git/dia/plug-ins/wpg/wpg.c
Line: 772
-> move intialization into the code branch using the variable

Value stored to 'hBrOld' during its initialization is never read
File: /home/hb/from-git/dia/plug-ins/wmf/wmf.cpp
Line: 1177
-> remove all the assignments to hBrOld and it's declaration

Value stored to 'renderer' during its initialization is never read
File: /home/hb/from-git/dia/plug-ins/wmf/wmf.cpp
Line: 1064
-> move intialization into the code branch using the variable

Value stored to 'wmf_renderer' during its initialization is never read
File: /home/hb/from-git/dia/plug-ins/wmf/wmf.cpp
Line: 1232
-> move deinitialization into *_finalize from end_render()
[scan-build] Dead increment (harmless)

Value stored to 'h' is never read
File: /home/hb/from-git/dia/objects/UML/node.c
Line: 304
-> removed

Value stored to 'y' is never read
File: /home/hb/from-git/dia/objects/UML/object.c
Line: 314
-> removed
[warningectomy] format '%d' expects argument of type 'int'

message.c: In function 'dia_log_message':
message.c:334:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'gulong' [-Wformat=]
   g_message ("%02d:%02d:%02d.%03d - %s", h, m, s, ms/1000, log);
   ^
message.c:334:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'gulong' [-Wformat=]
message.c:334:3: warning: format '%d' expects argument of type 'int', but argument 6 has type 'gulong' [-Wformat=]
message.c:334:3: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=]
[warningectomy] no return statement in function returning non-void

export_png.c: In function 'export_png':
export_png.c:379:1: warning: no return statement in function returning non-void
[scan-build] Result of operation is garbage or undefined (invalid)

Help scan-build to understand constraints on handles, too.

The left operand of '-' is a garbage value
File: /home/hb/from-git/dia/tests/test-objects.c
Line: 244
xfig-import: don't create a group for a single object

it's just superfluous and annoying during round-trip.