[GRASS-git] [OSGeo/grass] a85c7b: v.vol.rst: Initialize structure contents before pa...

ymdatta noreply at github.com
Tue Sep 10 02:58:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: a85c7b0b828152cd0e3aaa3f56d1b438bd137863
      https://github.com/OSGeo/grass/commit/a85c7b0b828152cd0e3aaa3f56d1b438bd137863
  Author: ymdatta <ymdatta.work at gmail.com>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    M vector/v.vol.rst/user2.c

  Log Message:
  -----------
  v.vol.rst: Initialize structure contents before passing it around (#4282)

* v.vol.rst: Initialize structure contents before passing it around

`skip_point` structure is not initialized when declared. This was
found using cppcheck tool.

Only when `cv` is true, `skip_point` contents are filled and the
structure is used. cppcheck raised the issue when 'cv' is false.
Technically, we don't need skip_point in such cases and not
initializing it won't affect the execution. Nevertheless, it's a
good practice to initialize structure contents at the time of
declaration.

Signed-off-by: Mohan Yelugoti <ymdatta.work at gmail.com>

* Use correct literal for double type

Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>

---------

Signed-off-by: Mohan Yelugoti <ymdatta.work at gmail.com>
Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list