]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
various simple changes to fix cppcheck warnings
[apt.git] / cmdline / apt-get.cc
index e3c74a0994dd5a720eae1570bfc121699f418db8..5e6f50d41cc71d2388e30996c121607751d9ea6e 100644 (file)
@@ -1912,7 +1912,6 @@ bool DoInstall(CommandLine &CmdL)
       return false;
    }
 
-   unsigned short const order[] = { MOD_REMOVE, MOD_INSTALL, 0 };
 
   TryToInstall InstallAction(Cache, Fix, BrokenFix);
   TryToRemove RemoveAction(Cache, Fix);
@@ -1920,6 +1919,7 @@ bool DoInstall(CommandLine &CmdL)
    // new scope for the ActionGroup
    {
       pkgDepCache::ActionGroup group(Cache);
+      unsigned short const order[] = { MOD_REMOVE, MOD_INSTALL, 0 };
 
       for (unsigned short i = 0; order[i] != 0; ++i)
       {
@@ -2023,7 +2023,7 @@ bool DoInstall(CommandLine &CmdL)
 
    /* Print out a list of suggested and recommended packages */
    {
-      string SuggestsList, RecommendsList, List;
+      string SuggestsList, RecommendsList;
       string SuggestsVersions, RecommendsVersions;
       for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
       {