[GRASS-dev] Fwd: New Coverity Scan report for GRASS GIS

Markus Neteler neteler at osgeo.org
Mon Apr 1 07:40:13 PDT 2019


Hi,

I finally got the Coverity Scan compilation running again. It offers
static compilation to catch code errors like dead code, unreachable
conditions and more.

After some time of struggling with the compilation I understood that
_Float128 was undefined. The trick: "cov-build" is still based on gcc6
while my system is more recent.
Hence, _Float128 has to be defined in an extra include file and given
to "cov-build" via CFLAGS:

CFLAGS="... -include /tmp/coverity.h ..."

For the latest Coverity Scan report, see below.

Cheers,
Markus


---------- Forwarded  message ---------
From: <scan-admin at coverity.com>
Date: Mon, Apr 1, 2019 at 3:53 PM
Subject: New Defects reported by Coverity Scan for grass
To: <neteler at gmail.com>


Hi,

Please find the latest report on new defect(s) introduced to grass
found with Coverity Scan.

1 new defect(s) introduced to grass found with Coverity Scan.
1584 defect(s), reported by Coverity Scan earlier, were marked fixed
in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1400466:    (UNINIT)
/misc/m.nviz.image/surface.c: 127 in load_rasters()
/misc/m.nviz.image/surface.c: 143 in load_rasters()
/misc/m.nviz.image/surface.c: 150 in load_rasters()
/misc/m.nviz.image/surface.c: 164 in load_rasters()
/misc/m.nviz.image/surface.c: 178 in load_rasters()


________________________________________________________________________________________________________
*** CID 1400466:    (UNINIT)
/misc/m.nviz.image/surface.c: 127 in load_rasters()
121                                                   color_const->answers[i -
122
    ncolor_map]),
123                               data);
124             }
125             else {                  /* use by default elevation
map for coloring */
126                 if (nelev_map > 0) {
>>>     CID 1400466:    (UNINIT)
>>>     Using uninitialized value "mapset" when calling "G_fully_qualified_name".
127                     Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, MAP_ATT,
128                                   G_fully_qualified_name(params->elev_map->
129
answers[i], mapset),
130                                   -1.0, data);
131                     G_verbose_message(_("Color attribute not
defined, using default <%s>"),
132                                       G_fully_qualified_name(params->
/misc/m.nviz.image/surface.c: 143 in load_rasters()
137                     G_fatal_error(_("Missing color attribute for
surface %d"),
138                                   i + 1);
139                 }
140             }
141             /* mask */
142             if (i < nmask_map && strcmp(params->mask_map->answers[i], "")) {
>>>     CID 1400466:    (UNINIT)
>>>     Using uninitialized value "mapset" when calling "G_fully_qualified_name".
143                 Nviz_set_attr(id, MAP_OBJ_SURF, ATT_MASK, MAP_ATT,
144
G_fully_qualified_name(params->mask_map->answers[i],
145                                                      mapset), -1.0, data);
146             }
147
148             /* transparency */
/misc/m.nviz.image/surface.c: 150 in load_rasters()
144
G_fully_qualified_name(params->mask_map->answers[i],
145                                                      mapset), -1.0, data);
146             }
147
148             /* transparency */
149             if (i < ntransp_map &&
strcmp(params->transp_map->answers[i], "")) {
>>>     CID 1400466:    (UNINIT)
>>>     Using uninitialized value "mapset" when calling "G_fully_qualified_name".
150                 Nviz_set_attr(id, MAP_OBJ_SURF, ATT_TRANSP, MAP_ATT,
151                               G_fully_qualified_name(params->
152                                                      transp_map->answers[i],
153                                                      mapset), -1.0, data);
154             }
155             else if (i - ntransp_map < ntransp_const &&
/misc/m.nviz.image/surface.c: 164 in load_rasters()
158                               atof(params->transp_const->
159                                    answers[i - ntransp_map]), data);
160             }
161
162             /* shininess */
163             if (i < nshine_map &&
strcmp(params->shine_map->answers[i], "")) {
>>>     CID 1400466:    (UNINIT)
>>>     Using uninitialized value "mapset" when calling "G_fully_qualified_name".
164                 Nviz_set_attr(id, MAP_OBJ_SURF, ATT_SHINE, MAP_ATT,
165                               G_fully_qualified_name(params->
166                                                      shine_map->answers[i],
167                                                      mapset), -1.0, data);
168             }
169             else if (i - nshine_map < nshine_const &&
/misc/m.nviz.image/surface.c: 178 in load_rasters()
172                               atof(params->shine_const->answers[i
- nshine_map]),
173                               data);
174             }
175
176             /* emission */
177             if (i < nemit_map && strcmp(params->emit_map->answers[i], "")) {
>>>     CID 1400466:    (UNINIT)
>>>     Using uninitialized value "mapset" when calling "G_fully_qualified_name".
178                 Nviz_set_attr(id, MAP_OBJ_SURF, ATT_EMIT, MAP_ATT,
179
G_fully_qualified_name(params->emit_map->answers[i],
180                                                      mapset), -1.0, data);
181             }
182             else if (i - nemit_map < nemit_const &&
183                      strcmp(params->emit_const->answers[i -
nemit_map], "")) {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRboWqkKU-2BRIvV-2FiDOYXTV0mKHmFWVx0lKOUGjtP4kEYbg-3D-3D_bOkZeOtpfWx9uhruxsjO9h13eZbGUt8w2PXepo9CPVnykYQUUzYUMdnMZ7ShYehoMP-2BPl-2BHB6CjtqKN7JoMW-2Bq1VJgum08fTcR7T8nOQ9VDxehSMEpon1SL3LN7oGnpB3cIHgasZDQ7XAQ6xQhaIBW4GE6BccpGpc0-2FkWyOvoTg4lrNJ-2BPFFt-2BauAzeueAKy1Iio18sqJK3-2F5W-2FsBHEbeg-3D-3D

  To manage Coverity Scan email notifications for "neteler at gmail.com",
click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq41ouTkv7a6ZwS4TYALxGrvo7qxH3UJFTiswOJgiUwLccdigSkh3uYLNHlFfY7iFv5uN0cWFsArXwuActVXTzCBPbZg9MtKBV2zgb3YYzpy1E-3D_bOkZeOtpfWx9uhruxsjO9h13eZbGUt8w2PXepo9CPVnykYQUUzYUMdnMZ7ShYehoYLOMg8luJSAwLK1yMEEheNREf66-2BbZBwgkG5JhDIesc0W28CdQLx4stqyg0fFo7P8kGZ-2B16w35Fbux8PAtYtM0FJFl08-2FZHvNdFJiiR5JlikKMU-2BEmIiyx-2BdearkQrBqXmzT2LSmsgwOd7EuqCGjag-3D-3D


More information about the grass-dev mailing list