libdnf-0.75.0-1.fc44

List of Findings

Error: COMPILER_WARNING (CWE-758): [#def1]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_common_types.dir/common_typesPYTHON_wrap.cxx:3507:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__common_types()’
# 3507 | #  define SWIG_init    PyInit__common_types
#      |                        ^~~~~~~~~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_common_types.dir/common_typesPYTHON_wrap.cxx:18202:1: note: in expansion of macro ‘SWIG_init’
#18202 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3505|     ------------------------------------------------*/
# 3506|   #if PY_VERSION_HEX >= 0x03000000
# 3507|-> #  define SWIG_init    PyInit__common_types
# 3508|   
# 3509|   #else

Error: COMPILER_WARNING (CWE-758): [#def2]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_conf.dir/confPYTHON_wrap.cxx:3539:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__conf()’
# 3539 | #  define SWIG_init    PyInit__conf
#      |                        ^~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_conf.dir/confPYTHON_wrap.cxx:30745:1: note: in expansion of macro ‘SWIG_init’
#30745 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3537|     ------------------------------------------------*/
# 3538|   #if PY_VERSION_HEX >= 0x03000000
# 3539|-> #  define SWIG_init    PyInit__conf
# 3540|   
# 3541|   #else

Error: COMPILER_WARNING (CWE-758): [#def3]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_error.dir/errorPYTHON_wrap.cxx:3457:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__error()’
# 3457 | #  define SWIG_init    PyInit__error
#      |                        ^~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_error.dir/errorPYTHON_wrap.cxx:4124:1: note: in expansion of macro ‘SWIG_init’
# 4124 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3455|     ------------------------------------------------*/
# 3456|   #if PY_VERSION_HEX >= 0x03000000
# 3457|-> #  define SWIG_init    PyInit__error
# 3458|   
# 3459|   #else

Error: COMPILER_WARNING (CWE-758): [#def4]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx: scope_hint: At global scope
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx:3515:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__module()’
# 3515 | #  define SWIG_init    PyInit__module
#      |                        ^~~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx:32638:1: note: in expansion of macro ‘SWIG_init’
#32638 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3513|     ------------------------------------------------*/
# 3514|   #if PY_VERSION_HEX >= 0x03000000
# 3515|-> #  define SWIG_init    PyInit__module
# 3516|   
# 3517|   #else

Error: COMPILER_WARNING (CWE-477): [#def5]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx: scope_hint: In function ‘PyObject* _wrap_ModulePackageContainer_getDisabledStreams(PyObject*, PyObject*)’
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx:29869:42: warning[-Wdeprecated-declarations]: ‘std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > libdnf::ModulePackageContainer::getDisabledStreams()’ is deprecated: Will be removed after 2019-12-31. Use getDisabledModules() instead.
#29869 |       result = (arg1)->getDisabledStreams();
#      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx:4187: included_from: Included from here.
libdnf-0.75.0/libdnf/module/ModulePackageContainer.hpp:251:40: note: declared here
#  251 |     std::map<std::string, std::string> getDisabledStreams();
#      |                                        ^~~~~~~~~~~~~~~~~~
#29867|     {
#29868|       try {
#29869|->       result = (arg1)->getDisabledStreams();
#29870|       } catch (const libdnf::Error & e) {
#29871|         PyErr_SetString(libdnf_error, const_cast<char*>(e.what()));

Error: COMPILER_WARNING (CWE-477): [#def6]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx: scope_hint: In function ‘PyObject* _wrap_ModulePackageContainer_getResetStreams(PyObject*, PyObject*)’
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_module.dir/modulePYTHON_wrap.cxx:29939:39: warning[-Wdeprecated-declarations]: ‘std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > libdnf::ModulePackageContainer::getResetStreams()’ is deprecated: Will be removed after 2019-12-31. Use getResetModules() instead.
#29939 |       result = (arg1)->getResetStreams();
#      |                ~~~~~~~~~~~~~~~~~~~~~~~^~
libdnf-0.75.0/libdnf/module/ModulePackageContainer.hpp:263:40: note: declared here
#  263 |     std::map<std::string, std::string> getResetStreams();
#      |                                        ^~~~~~~~~~~~~~~
#29937|     {
#29938|       try {
#29939|->       result = (arg1)->getResetStreams();
#29940|       } catch (const libdnf::Error & e) {
#29941|         PyErr_SetString(libdnf_error, const_cast<char*>(e.what()));

Error: COMPILER_WARNING (CWE-758): [#def7]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_repo.dir/repoPYTHON_wrap.cxx:4017:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__repo()’
# 4017 | #  define SWIG_init    PyInit__repo
#      |                        ^~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_repo.dir/repoPYTHON_wrap.cxx:17948:1: note: in expansion of macro ‘SWIG_init’
#17948 | SWIG_init(void) {
#      | ^~~~~~~~~
# 4015|     ------------------------------------------------*/
# 4016|   #if PY_VERSION_HEX >= 0x03000000
# 4017|-> #  define SWIG_init    PyInit__repo
# 4018|   
# 4019|   #else

Error: COMPILER_WARNING (CWE-758): [#def8]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_smartcols.dir/smartcolsPYTHON_wrap.cxx:3481:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__smartcols()’
# 3481 | #  define SWIG_init    PyInit__smartcols
#      |                        ^~~~~~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_smartcols.dir/smartcolsPYTHON_wrap.cxx:12059:1: note: in expansion of macro ‘SWIG_init’
#12059 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3479|     ------------------------------------------------*/
# 3480|   #if PY_VERSION_HEX >= 0x03000000
# 3481|-> #  define SWIG_init    PyInit__smartcols
# 3482|   
# 3483|   #else

Error: COMPILER_WARNING (CWE-758): [#def9]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_transaction.dir/transactionPYTHON_wrap.cxx:3513:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__transaction()’
# 3513 | #  define SWIG_init    PyInit__transaction
#      |                        ^~~~~~~~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_transaction.dir/transactionPYTHON_wrap.cxx:21420:1: note: in expansion of macro ‘SWIG_init’
#21420 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3511|     ------------------------------------------------*/
# 3512|   #if PY_VERSION_HEX >= 0x03000000
# 3513|-> #  define SWIG_init    PyInit__transaction
# 3514|   
# 3515|   #else

Error: COMPILER_WARNING (CWE-758): [#def10]
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_utils.dir/utilsPYTHON_wrap.cxx:3974:24: warning[-Wmissing-declarations]: no previous declaration for ‘PyObject* PyInit__utils()’
# 3974 | #  define SWIG_init    PyInit__utils
#      |                        ^~~~~~~~~~~~~
libdnf-0.75.0/build-py3/bindings/python/CMakeFiles/_utils.dir/utilsPYTHON_wrap.cxx:7637:1: note: in expansion of macro ‘SWIG_init’
# 7637 | SWIG_init(void) {
#      | ^~~~~~~~~
# 3972|     ------------------------------------------------*/
# 3973|   #if PY_VERSION_HEX >= 0x03000000
# 3974|-> #  define SWIG_init    PyInit__utils
# 3975|   
# 3976|   #else

Error: COMPILER_WARNING (CWE-477): [#def11]
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp: scope_hint: In function ‘gboolean dnf_repo_loader_get_repos_removable(DnfRepoLoader*, GError**)’
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:249:31: warning[-Wdeprecated-declarations]: ‘GList* g_unix_mounts_get(guint64*)’ is deprecated: Use 'g_unix_mount_entries_get' instead
#  249 |     mounts = g_unix_mounts_get(NULL);
#      |              ~~~~~~~~~~~~~~~~~^~~~~~
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:37: included_from: Included from here.
/usr/include/gio-unix-2.0/gio/gunixmounts.h:199:16: note: declared here
#  199 | GList *        g_unix_mounts_get                    (guint64            *time_read);
#      |                ^~~~~~~~~~~~~~~~~
#  247|   
#  248|       /* coldplug the mounts */
#  249|->     mounts = g_unix_mounts_get(NULL);
#  250|       for (l = mounts; l != NULL; l = l->next) {
#  251|           GUnixMountEntry *e =(GUnixMountEntry *) l->data;

Error: COMPILER_WARNING (CWE-477): [#def12]
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:252:38: warning[-Wdeprecated-declarations]: ‘gboolean g_unix_mount_is_readonly(GUnixMountEntry*)’ is deprecated: Use 'g_unix_mount_entry_is_readonly' instead
#  252 |         if (!g_unix_mount_is_readonly(e))
#      |              ~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:125:16: note: declared here
#  125 | gboolean       g_unix_mount_is_readonly             (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~
#  250|       for (l = mounts; l != NULL; l = l->next) {
#  251|           GUnixMountEntry *e =(GUnixMountEntry *) l->data;
#  252|->         if (!g_unix_mount_is_readonly(e))
#  253|               continue;
#  254|           if (g_strcmp0(g_unix_mount_get_fs_type(e), "iso9660") != 0)

Error: COMPILER_WARNING (CWE-477): [#def13]
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:254:47: warning[-Wdeprecated-declarations]: ‘const char* g_unix_mount_get_fs_type(GUnixMountEntry*)’ is deprecated: Use 'g_unix_mount_entry_get_fs_type' instead
#  254 |         if (g_strcmp0(g_unix_mount_get_fs_type(e), "iso9660") != 0)
#      |                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:115:16: note: declared here
#  115 | const char *   g_unix_mount_get_fs_type             (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~
#  252|           if (!g_unix_mount_is_readonly(e))
#  253|               continue;
#  254|->         if (g_strcmp0(g_unix_mount_get_fs_type(e), "iso9660") != 0)
#  255|               continue;
#  256|           ret = dnf_repo_loader_add_sack_from_mount_point(self,

Error: COMPILER_WARNING (CWE-477): [#def14]
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:257:78: warning[-Wdeprecated-declarations]: ‘const char* g_unix_mount_get_mount_path(GUnixMountEntry*)’ is deprecated: Use 'g_unix_mount_entry_get_mount_path' instead
#  257 |                                                   g_unix_mount_get_mount_path(e),
#      |                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:100:16: note: declared here
#  100 | const char *   g_unix_mount_get_mount_path          (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  255|               continue;
#  256|           ret = dnf_repo_loader_add_sack_from_mount_point(self,
#  257|->                                                   g_unix_mount_get_mount_path(e),
#  258|                                                     &idx,
#  259|                                                     error);

Error: COMPILER_WARNING (CWE-477): [#def15]
libdnf-0.75.0/libdnf/dnf-repo-loader.cpp:264:35: warning[-Wdeprecated-declarations]: ‘void g_unix_mount_free(GUnixMountEntry*)’ is deprecated: Use 'g_unix_mount_entry_free' instead
#  264 |     g_list_foreach(mounts,(GFunc) g_unix_mount_free, NULL);
#      |                                   ^~~~~~~~~~~~~~~~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:78:16: note: declared here
#   78 | void           g_unix_mount_free                    (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~
#  262|       }
#  263|   out:
#  264|->     g_list_foreach(mounts,(GFunc) g_unix_mount_free, NULL);
#  265|       g_list_free(mounts);
#  266|       return ret;

Error: CPPCHECK_WARNING (CWE-562): [#def16]
libdnf-0.75.0/libdnf/hy-iutil.cpp:548: error[returnDanglingLifetime]: Returning pointer to local variable 'dup' that will be invalid when returning.
#  546|   {
#  547|       char *dup = pool_alloctmpspace(pool, strlen(s) + 1);
#  548|->     return strcpy(dup, s);
#  549|   }
#  550|   

Error: COMPILER_WARNING: [#def17]
libdnf-0.75.0/libdnf/hy-package.cpp:58:3: warning[-Wodr]: type ‘struct DnfPackagePrivate’ violates the C++ One Definition Rule
#   58 | } DnfPackagePrivate;
#      |   ^
libdnf-0.75.0/libdnf/dnf-package.cpp:62:3: note: a different type is defined in another translation unit
#   62 | } DnfPackagePrivate;
#      |   ^
libdnf-0.75.0/libdnf/hy-package.cpp:55:22: note: the first difference of corresponding definitions is field ‘loaded’
#   55 |     gboolean         loaded;
#      |                      ^
libdnf-0.75.0/libdnf/dnf-package.cpp:54:22: note: a field with different name is defined in another translation unit
#   54 |     char            *checksum_str;
#      |                      ^
#   56|       Id               id;
#   57|       DnfSack         *sack;
#   58|-> } DnfPackagePrivate;
#   59|   
#   60|   G_DEFINE_TYPE_WITH_PRIVATE(DnfPackage, dnf_package, G_TYPE_OBJECT)

Error: CPPCHECK_WARNING (CWE-398): [#def18]
libdnf-0.75.0/libdnf/utils/sqlite3/Sqlite3.hpp:337: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
#  335|       }
#  336|   
#  337|->     ~SQLite3() { close(); }
#  338|   
#  339|       const std::string &getPath() const { return path; }

Error: CPPCHECK_WARNING (CWE-476): [#def19]
libdnf-0.75.0/tests/hawkey/test_iutil.cpp:42: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#   40|       FILE *fp = fopen(filename, "w+");
#   41|       fail_if(fp == NULL);
#   42|->     fail_unless(fwrite("empty", 5, 1, fp) == 1);
#   43|       fclose(fp);
#   44|   }

Error: CPPCHECK_WARNING (CWE-476): [#def20]
libdnf-0.75.0/tests/hawkey/test_iutil.cpp:43: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#   41|       fail_if(fp == NULL);
#   42|       fail_unless(fwrite("empty", 5, 1, fp) == 1);
#   43|->     fclose(fp);
#   44|   }
#   45|   

Error: CPPCHECK_WARNING (CWE-476): [#def21]
libdnf-0.75.0/tests/hawkey/test_sack.cpp:170: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  168|       FILE *fp = g_fopen (path_null_rpm, "w");
#  169|       fail_unless (fp != NULL);
#  170|->     fclose (fp);
#  171|       fail_unless (dnf_sack_add_cmdline_package (sack, path_null_rpm) == NULL);
#  172|   }

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-10.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibdnf-0.75.0-1.fc44
store-results-to/tmp/tmprlgsfwkj/libdnf-0.75.0-1.fc44.tar.xz
time-created2025-10-28 18:57:41
time-finished2025-10-28 19:01:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmprlgsfwkj/libdnf-0.75.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmprlgsfwkj/libdnf-0.75.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9