Task #91364 - fixed.err
back to task #91364download
Error: COMPILER_WARNING (CWE-252):
libdnf-0.74.0/libdnf/utils/smartcols/Table.cpp: scope_hint: In member function ‘void Table::removeColumn(const std::shared_ptr<Column>&)’
libdnf-0.74.0/libdnf/utils/smartcols/Table.cpp:104:16: warning[-Wunused-result]: ignoring return value of ‘_FIter std::remove(_FIter, _FIter, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<shared_ptr<Column>*, vector<shared_ptr<Column> > >; _Tp = shared_ptr<Column>]’, declared with attribute ‘nodiscard’
# 104 | std::remove(std::begin(columns), std::end(columns), column);
# | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/16/algorithm:63: included_from: Included from here.
libdnf-0.74.0/libdnf/utils/tinyformat/tinyformat.hpp:144: included_from: Included from here.
libdnf-0.74.0/libdnf/utils/smartcols/Table.hpp:28: included_from: Included from here.
libdnf-0.74.0/libdnf/utils/smartcols/Table.cpp:21: included_from: Included from here.
/usr/include/c++/16/bits/stl_algo.h:770:5: note: declared here
# 770 | remove(_ForwardIterator __first, _ForwardIterator __last,
# | ^~~~~~
# 102| void Table::removeColumn(const std::shared_ptr<Column> &column)
# 103| {
# 104|-> std::remove(std::begin(columns), std::end(columns), column);
# 105| scols_table_remove_column(table, column->column);
# 106| }
Error: COMPILER_WARNING (CWE-252):
libdnf-0.74.0/libdnf/utils/smartcols/Table.cpp: scope_hint: In member function ‘void Table::removeLine(const std::shared_ptr<Line>&)’
libdnf-0.74.0/libdnf/utils/smartcols/Table.cpp:116:16: warning[-Wunused-result]: ignoring return value of ‘_FIter std::remove(_FIter, _FIter, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<shared_ptr<Line>*, vector<shared_ptr<Line> > >; _Tp = shared_ptr<Line>]’, declared with attribute ‘nodiscard’
# 116 | std::remove(std::begin(lines), std::end(lines), line);
# | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/16/bits/stl_algo.h:770:5: note: declared here
# 770 | remove(_ForwardIterator __first, _ForwardIterator __last,
# | ^~~~~~
# 114| void Table::removeLine(const std::shared_ptr<Line> &line)
# 115| {
# 116|-> std::remove(std::begin(lines), std::end(lines), line);
# 117| scols_table_remove_line(table, line->line);
# 118| }
Error: COMPILER_WARNING (CWE-685):
libdnf-0.74.0/tests/hawkey/test_suites.h:24: included_from: Included from here.
libdnf-0.74.0/tests/hawkey/test_goal.cpp:38: included_from: Included from here.
libdnf-0.74.0/tests/hawkey/test_goal.cpp: scope_hint: In function ‘DnfPackage* get_latest_pkg(DnfSack*, const char*)’
libdnf-0.74.0/tests/hawkey/test_goal.cpp:54:17: warning[-Wformat-extra-args]: too many arguments for format
# 54 | "get_latest_pkg() failed finding '%s'.", name);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 474 | assert_list_names<&dnf_package_get_name>(true, plist, "penny", NULL);
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 52| GPtrArray *plist = hy_query_run(q);
# 53| fail_unless(plist->len == 1,
# 54|-> "get_latest_pkg() failed finding '%s'.", name);
# 55| auto pkg = static_cast<DnfPackage *>(g_object_ref(g_ptr_array_index(plist, 0)));
# 56| hy_query_free(q);
Error: COMPILER_WARNING (CWE-685):
libdnf-0.74.0/tests/hawkey/test_goal.cpp:439:18: warning[-Wformat-extra-args]: too many arguments for format
# 439 | fail("assert_list_names(): list too short");
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 437| while ((name = va_arg(names, char *)) != NULL) {
# 438| if (i++ >= count) {
# 439|-> fail("assert_list_names(): list too short");
# 440| }
# 441| bool found = false;
Error: COMPILER_WARNING (CWE-685):
libdnf-0.74.0/tests/hawkey/test_goal.cpp:449:32: warning[-Wformat-extra-args]: too many arguments for format
# 449 | fail_unless(false, "assert_list_names(): element '%s' %sfound '%zu'",
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 447| }
# 448| if ((wanted && !found) || (!wanted && found)) {
# 449|-> fail_unless(false, "assert_list_names(): element '%s' %sfound '%zu'",
# 450| name, wanted ? "not ": "", stringVector.size());
# 451| }
Error: COMPILER_WARNING (CWE-685):
libdnf-0.74.0/tests/hawkey/test_goal.cpp:458:33: warning[-Wformat-extra-args]: too many arguments for format
# 458 | fail_unless(i == count, "assert_list_names(): too many items in the list (%d vs %d)", i, count);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1064 | assert_list_names<&dnf_package_get_nevra>(true, plist, "bloop-2.0-1.noarch", "dog-1-2.x86_64", "fool-1-5.noarch",
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1065 | "flying-3.1-0.x86_64", "pilchard-1.2.4-1.x86_64", "pilchard-1.2.4-1.i686", NULL);
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 456| // already checked above.
# 457| if (wanted) {
# 458|-> fail_unless(i == count, "assert_list_names(): too many items in the list (%d vs %d)", i, count);
# 459| }
# 460| va_end(names);
Error: CPPCHECK_WARNING (CWE-476):
libdnf-0.74.0/tests/hawkey/test_iutil.cpp:129: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
# 127| fail_unless(dnf_solvfile);
# 128| fail_unless(solv_userdata_verify(dnf_solvfile.get(), cs_computed));
# 129|-> fclose(fp);
# 130|
# 131| g_free(new_file);