Error: COMPILER_WARNING (CWE-477): [#def1] spglib-2.6.0/python/py_bindings.cpp: scope_hint: In function ‘std::optional<pybind11::list> spglib::layer_dataset(array_double, array_double, array_int, pybind11::int_, pybind11::float_)’ spglib-2.6.0/python/py_bindings.cpp:270:41: warning[-Wdeprecated-declarations]: ‘SpglibDataset* spg_get_layer_dataset(const double (*)[3], const double (*)[3], const int*, int, int, double)’ is deprecated: Experimental interface. May be removed in next major release. # 270 | if ((dataset = spg_get_layer_dataset((double (*)[3])lattice.data(), # | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 271 | (double (*)[3])positions.data(), # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 272 | atom_types.data(), atom_types.size(), # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 273 | aperiodic_dir, symprec)) == nullptr) { # | ~~~~~~~~~~~~~~~~~~~~~~~ spglib-2.6.0/python/py_bindings.cpp:4: included_from: Included from here. spglib-2.6.0/include/spglib.h:213:1: note: declared here # 213 | spg_get_layer_dataset(double const lattice[3][3], double const position[][3], # | ^~~~~~~~~~~~~~~~~~~~~ # 268| py::float_ symprec) { # 269| SpglibDataset *dataset; # 270|-> if ((dataset = spg_get_layer_dataset((double (*)[3])lattice.data(), # 271| (double (*)[3])positions.data(), # 272| atom_types.data(), atom_types.size(), Error: CPPCHECK_WARNING (CWE-457): [#def2] spglib-2.6.0/src/delaunay.c:95: warning[uninitvar]: Uninitialized variable: succeeded # 93| } # 94| # 95|-> if (!succeeded) # 96| goto err; # 97| Error: CPPCHECK_WARNING (CWE-457): [#def3] spglib-2.6.0/src/delaunay.c:362: warning[uninitvar]: Uninitialized variable: succeeded # 360| } # 361| # 362|-> if (!succeeded) # 363| goto err; # 364| Error: COMPILER_WARNING (CWE-457): [#def4] spglib-2.6.0/src/spacegroup.c:1046:13: warning[-Wmaybe-uninitialized]: ‘num_free_axes’ may be used uninitialized # 1046 | if (match_hall_symbol_db_ortho(origin_shift, conv_lattice, orig_lattice, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1047 | hall_number, centering, symmetry, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1048 | num_free_axes, symprec)) { # | ~~~~~~~~~~~~~~~~~~~~~~~ spglib-2.6.0/src/spacegroup.c: scope_hint: In function ‘search_hall_number’ spglib-2.6.0/src/spacegroup.c:980:19: note: ‘num_free_axes’ was declared here # 980 | int is_found, num_free_axes; # | ^~~~~~~~~~~~~ # 1044| } # 1045| # 1046|-> if (match_hall_symbol_db_ortho(origin_shift, conv_lattice, orig_lattice, # 1047| hall_number, centering, symmetry, # 1048| num_free_axes, symprec)) { Error: CPPCHECK_WARNING (CWE-823): [#def5] spglib-2.6.0/src/spglib.c:220: error[arrayIndexOutOfBounds]: Array 'spglib_error_message[10]' accessed at index 99, which is out of bounds. # 218| # 219| for (i = 0; i < 100; i++) { # 220|-> if (SPGERR_NONE == spglib_error_message[i].error) # 221| break; # 222| Error: CPPCHECK_WARNING (CWE-476): [#def6] spglib-2.6.0/src/symmetry.c:517: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: copy_atoms_found # 515| # 516| for (initial_atom = 0; initial_atom < cell->size; initial_atom++) { # 517|-> if (!copy_atoms_found[initial_atom]) # 518| continue; # 519| Error: CPPCHECK_WARNING (CWE-476): [#def7] spglib-2.6.0/src/symmetry.c:746: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: copy_atoms_found # 744| # 745| for (initial_atom = 0; initial_atom < cell->size; initial_atom++) { # 746|-> if (!copy_atoms_found[initial_atom]) # 747| continue; # 748| Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] spglib-2.6.0/src/symmetry.c:746:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘copy_atoms_found’ # 744| # 745| for (initial_atom = 0; initial_atom < cell->size; initial_atom++) { # 746|-> if (!copy_atoms_found[initial_atom]) # 747| continue; # 748| Error: GCC_ANALYZER_WARNING (CWE-457): [#def9] spglib-2.6.0/src/symmetry.c:746:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 744| # 745| for (initial_atom = 0; initial_atom < cell->size; initial_atom++) { # 746|-> if (!copy_atoms_found[initial_atom]) # 747| continue; # 748|
| analyzer-version-clippy | 1.86.0 |
| analyzer-version-cppcheck | 2.17.1 |
| analyzer-version-gcc | 15.1.1 |
| analyzer-version-gcc-analyzer | 15.1.1 |
| analyzer-version-shellcheck | 0.10.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.86.0 |
| diffbase-analyzer-version-cppcheck | 2.17.1 |
| diffbase-analyzer-version-gcc | 15.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 15.1.1 |
| diffbase-analyzer-version-shellcheck | 0.10.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-29.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250509.165649.g41c6174.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | spglib-2.6.0-1.20250512100432049770.develop.10.gcff3a27 |
| diffbase-store-results-to | /tmp/tmpkk4qej47/spglib-2.6.0-1.20250512100432049770.develop.10.gcff3a27.tar.xz |
| diffbase-time-created | 2025-05-12 13:57:47 |
| diffbase-time-finished | 2025-05-12 13:59:52 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpkk4qej47/spglib-2.6.0-1.20250512100432049770.develop.10.gcff3a27.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpkk4qej47/spglib-2.6.0-1.20250512100432049770.develop.10.gcff3a27.src.rpm' |
| diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-29.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250509.165649.g41c6174.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | spglib-2.6.0-1.20250512135318961510.pr581.12.g55839b5 |
| store-results-to | /tmp/tmpq3t74xi_/spglib-2.6.0-1.20250512135318961510.pr581.12.g55839b5.tar.xz |
| time-created | 2025-05-12 14:00:10 |
| time-finished | 2025-05-12 14:01:47 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpq3t74xi_/spglib-2.6.0-1.20250512135318961510.pr581.12.g55839b5.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpq3t74xi_/spglib-2.6.0-1.20250512135318961510.pr581.12.g55839b5.src.rpm' |
| tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |