zypper-1.14.73-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
zypper-1.14.73-build/zypper-1.14.73/src/CommitSummary.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def2]
zypper-1.14.73-build/zypper-1.14.73/src/SolverRequester.cc:624:2: warning[-Wcpp]: #warning TODO handle pseudoinstalled objects
#  624 | #warning TODO handle pseudoinstalled objects
#      |  ^~~~~~~
#  622|       INT << "no installed object, nothing to update, returning" << endl;
#  623|       return;
#  624|-> #warning TODO handle pseudoinstalled objects
#  625|     }
#  626|   

Error: COMPILER_WARNING (CWE-477): [#def3]
zypper-1.14.73-build/zypper-1.14.73/src/Zypper.cc: scope_hint: In member function ‘void Zypper::doCommand(int, char**, int)’
zypper-1.14.73-build/zypper-1.14.73/src/Zypper.cc:670:43: warning[-Wdeprecated-declarations]: ‘void zypp::zypp_readonly_hack::IWantIt()’ is deprecated
#  670 |               zypp_readonly_hack::IWantIt ();
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/zypp/zypp_detail/ZYppReadOnlyHack.h:26:17: note: declared here
#   26 |     extern void IWantIt() ZYPP_DEPRECATED;
#      |                 ^~~~~~~
#  668|               const char *roh = getenv( "ZYPP_READONLY_HACK" );
#  669|               if ( roh != NULL && roh[0] == '1' )
#  670|->               zypp_readonly_hack::IWantIt ();
#  671|               else if ( command() == ZypperCommand::LIST_REPOS
#  672|                 || command() == ZypperCommand::LIST_SERVICES

Error: COMPILER_WARNING (CWE-477): [#def4]
zypper-1.14.73-build/zypper-1.14.73/src/Zypper.cc:676:43: warning[-Wdeprecated-declarations]: ‘void zypp::zypp_readonly_hack::IWantIt()’ is deprecated
#  676 |               zypp_readonly_hack::IWantIt (); // #247001, #302152
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/zypp/zypp_detail/ZYppReadOnlyHack.h:26:17: note: declared here
#   26 |     extern void IWantIt() ZYPP_DEPRECATED;
#      |                 ^~~~~~~
#  674|                 || command() == ZypperCommand::VERSION_CMP
#  675|                 || command() == ZypperCommand::TARGET_OS )
#  676|->               zypp_readonly_hack::IWantIt (); // #247001, #302152
#  677|             }
#  678|             assertZYppPtrGod();

Error: CPPCHECK_WARNING: [#def5]
zypper-1.14.73-build/zypper-1.14.73/src/callbacks/media.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
zypper-1.14.73-build/zypper-1.14.73/src/commands/help.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
zypper-1.14.73-build/zypper-1.14.73/src/commands/ps.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def8]
zypper-1.14.73-build/zypper-1.14.73/src/commands/search/search.cc:413:41: warning[cplusplus.Move]: Method called on moved-from object 'matchedSolv'
#  411|   
#  412|             if ( _verbose ) {
#  413|->             CapabilitySet matchedCaps = matchedSolv.matchesSolvable( reqSearchAttrib, slv).second;
#  414|               p.first->second.insert( matchedCaps.begin(), matchedCaps.end() );
#  415|             }

Error: CPPCHECK_WARNING: [#def9]
zypper-1.14.73-build/zypper-1.14.73/src/commands/subcommand.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
zypper-1.14.73-build/zypper-1.14.73/src/commands/utils/download.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def12]
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc: scope_hint: In function ‘{anonymous}::LocaleStateMap {anonymous}::argsToLocaleSet(const std::vector<std::__cxx11::basic_string<char> >&, bool)’
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc:95:66: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#   95 |       for ( const auto & avloc : God->pool().getAvailableLocales() )
#      |                                                                  ^
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc:95:65: note: the temporary was destroyed at the end of the full expression ‘zypp::ZYpp::pool() const().zypp::ResPool::getAvailableLocales()’
#   95 |       for ( const auto & avloc : God->pool().getAvailableLocales() )
#      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
#   93|         for ( Locale rloc : God->target()->requestedLocales() )
#   94|           ret[rloc].tagRequested();
#   95|->       for ( const auto & avloc : God->pool().getAvailableLocales() )
#   96|           ret[avloc].tagAvailable();	// Requested/Fallback state will be adjusted later
#   97|       }

Error: COMPILER_WARNING: [#def13]
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc:102:20: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  102 |       const auto & av { God->pool().getAvailableLocales() };
#      |                    ^~
zypper-1.14.73-build/zypper-1.14.73/src/locales.cc:102:56: note: the temporary was destroyed at the end of the full expression ‘zypp::ZYpp::pool() const().zypp::ResPool::getAvailableLocales()’
#  102 |       const auto & av { God->pool().getAvailableLocales() };
#      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
#  100|         // Search patterns are matched against available locales.
#  101|         // Exact locales are added even if not in available locales.
#  102|->       const auto & av { God->pool().getAvailableLocales() };
#  103|         for ( const auto & larg : localeArgs_r )
#  104|         {

Error: CPPCHECK_WARNING: [#def14]
zypper-1.14.73-build/zypper-1.14.73/src/main.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def15]
zypper-1.14.73-build/zypper-1.14.73/src/main.cc: scope_hint: In function ‘void signal_handler(int)’
zypper-1.14.73-build/zypper-1.14.73/src/main.cc:43:11: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   43 |     write ( STDERR_FILENO, exit_requested_twice_str, strlen(exit_requested_twice_str) );
#      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   41|     Zypper & zypper( Zypper::instance( true ) );
#   42|     if ( zypper.exitRequested() >= 1 ) {
#   43|->     write ( STDERR_FILENO, exit_requested_twice_str, strlen(exit_requested_twice_str) );
#   44|       zypper.requestImmediateExit();
#   45|     } else {

Error: COMPILER_WARNING (CWE-252): [#def16]
zypper-1.14.73-build/zypper-1.14.73/src/main.cc:46:11: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   46 |     write ( STDERR_FILENO, exit_requested_once_str, strlen(exit_requested_once_str) );
#      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   44|       zypper.requestImmediateExit();
#   45|     } else {
#   46|->     write ( STDERR_FILENO, exit_requested_once_str, strlen(exit_requested_once_str) );
#   47|       zypper.requestExit();
#   48|     }

Error: CLANG_WARNING: [#def17]
zypper-1.14.73-build/zypper-1.14.73/src/solve-commit.cc:202:12: warning[deadcode.DeadStores]: Value stored to 'reply' during its initialization is never read
#  200|   
#  201|     bool showExtInfo = false;
#  202|->   unsigned reply = default_reply;
#  203|   
#  204|     while ( true ) {

Error: COMPILER_WARNING (CWE-457): [#def18]
zypper-1.14.73-build/zypper-1.14.73/src/utils/flags/flagtypes.h:78:5: warning[-Wuninitialized]: ‘MEM <unsigned char> [(const struct optional &)&D.366612 + 1]’ is used uninitialized
#   78 |     [defVal]() -> boost::optional<std::string>{
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   79 |       if (!defVal)
#      |       ~~~~~~~~~~~~
#   80 |         return boost::optional<std::string>();
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   81 |       return std::string( (*defVal) ? "true" : "false" );
#      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   82 |     },
#      |     ~
zypper-1.14.73-build/zypper-1.14.73/src/commands/locale/addlocalecmd.cc: scope_hint: In member function ‘AddLocaleCmd::cmdOptions() const’
zypper-1.14.73-build/zypper-1.14.73/src/commands/locale/addlocalecmd.cc:33:79: note: ‘<anonymous>’ declared here
#   33 |     { "no-packages", 'n', ZyppFlags::NoArgument, ZyppFlags::BoolCompatibleType( that._packages, ZyppFlags::StoreFalse ), _("Do not install corresponding packages for given locale(s).") },
#      |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   76|   {
#   77|     return Value (
#   78|->     [defVal]() -> boost::optional<std::string>{
#   79|         if (!defVal)
#   80|           return boost::optional<std::string>();

Error: COMPILER_WARNING (CWE-457): [#def19]
zypper-1.14.73-build/zypper-1.14.73/src/utils/flags/flagtypes.h:78:5: warning[-Wuninitialized]: ‘MEM <unsigned char> [(const struct optional &)&D.366700 + 1]’ is used uninitialized
#   78 |     [defVal]() -> boost::optional<std::string>{
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   79 |       if (!defVal)
#      |       ~~~~~~~~~~~~
#   80 |         return boost::optional<std::string>();
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   81 |       return std::string( (*defVal) ? "true" : "false" );
#      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   82 |     },
#      |     ~
zypper-1.14.73-build/zypper-1.14.73/src/commands/locale/removelocalecmd.cc: scope_hint: In member function ‘RemoveLocaleCmd::cmdOptions() const’
zypper-1.14.73-build/zypper-1.14.73/src/commands/locale/removelocalecmd.cc:46:79: note: ‘<anonymous>’ declared here
#   46 |     { "no-packages", 'n', ZyppFlags::NoArgument, ZyppFlags::BoolCompatibleType( that._packages, ZyppFlags::StoreFalse ), _("Do not remove corresponding packages for given locale(s).") },
#      |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   76|   {
#   77|     return Value (
#   78|->     [defVal]() -> boost::optional<std::string>{
#   79|         if (!defVal)
#   80|           return boost::optional<std::string>();

Error: CPPCHECK_WARNING: [#def20]
zypper-1.14.73-build/zypper-1.14.73/src/utils/flags/zyppflags.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def21]
zypper-1.14.73-build/zypper-1.14.73/src/utils/getopt.cc:102:28: warning[core.NullDereference]: Dereference of null pointer
#  100|         break;
#  101|       default:
#  102|->       const char *mapidx = optc? short2long[optc] : longopts[option_index].name;
#  103|   
#  104|         // creates if not there

Error: COMPILER_WARNING (CWE-477): [#def22]
zypper-1.14.73-build/zypper-1.14.73/src/utils/misc.cc: scope_hint: In function ‘zypp::filesystem::Pathname cache_rpm(const std::string&, const zypp::filesystem::Pathname&)’
zypper-1.14.73-build/zypper-1.14.73/src/utils/misc.cc:635:19: warning[-Wdeprecated-declarations]: ‘void zypp::media::MediaManager::provideFile(zypp::media::MediaAccessId, const zypp::filesystem::Pathname&) const’ is deprecated
#  635 |     mm.provideFile(mid, rpmpath.basename());
#      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
zypper-1.14.73-build/zypper-1.14.73/src/utils/misc.cc:16: included_from: Included from here.
/usr/include/zypp/media/MediaManager.h:739:5: note: declared here
#  739 |     provideFile(MediaAccessId   accessId,
#      |     ^~~~~~~~~~~
#  633|       mm.attach(mid);
#  634|   
#  635|->     mm.provideFile(mid, rpmpath.basename());
#  636|       Pathname localrpmpath = mm.localPath(mid, rpmpath.basename());
#  637|       filesystem::assert_dir(cache_dir);

Error: CPPCHECK_WARNING: [#def23]
zypper-1.14.73-build/zypper-1.14.73/src/utils/prompt.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-144.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namezypper-1.14.73-1.fc41
store-results-to/tmp/tmpzzndpro_/zypper-1.14.73-1.fc41.tar.xz
time-created2024-07-03 19:49:33
time-finished2024-07-03 19:54:41
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpzzndpro_/zypper-1.14.73-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpzzndpro_/zypper-1.14.73-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9