]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Get rid of gcc-6 warnings
authorMichael Schroeder <mls@suse.de>
Fri, 2 Sep 2016 14:26:10 +0000 (16:26 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 2 Sep 2016 14:26:10 +0000 (16:26 +0200)
examples/solv/patchjobs.c
src/order.c
src/rules.c
src/selection.c
src/solver.c

index 64ad6077b537a35a57e5200f94dae01abd0d2d90..929a2033ddaa70c71345236aadce8d64ee54e967 100644 (file)
@@ -19,8 +19,10 @@ add_patchjobs(Pool *pool, Queue *job)
   map_init(&installedmap, pool->nsolvables);
   solver_calculate_multiversionmap(pool, job, &multiversionmap);
   if (pool->installed)
-    FOR_REPO_SOLVABLES(pool->installed, p, s)
-      MAPSET(&installedmap, p);
+    {
+      FOR_REPO_SOLVABLES(pool->installed, p, s)
+        MAPSET(&installedmap, p);
+    }
 
   /* install all patches */
   for (p = 1; p < pool->nsolvables; p++)
index d560865cf2bea0d68f51708188e1d96bd561f39a..4fe3e08c1404427a133b59ed2c869442360ac822 100644 (file)
@@ -1262,8 +1262,10 @@ transaction_check_order(Transaction *trans)
   map_init(&ins, pool->nsolvables);
   map_init(&seen, pool->nsolvables);
   if (pool->installed)
-    FOR_REPO_SOLVABLES(pool->installed, p, s)
-      MAPSET(&ins, p);
+    {
+      FOR_REPO_SOLVABLES(pool->installed, p, s)
+        MAPSET(&ins, p);
+    }
   lastins = 0;
   for (i = 0; i < trans->steps.count; i++)
     {
index aa90b5f45c83378b8d3784f174d048afce7e5c0e..67f10d8989fd009dac469e0bf98686a0e43efb28 100644 (file)
@@ -2361,8 +2361,10 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
       if (!installed)
        break;
       if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
-       FOR_REPO_SOLVABLES(installed, p, s)
-         queue_push2(q, DISABLE_UPDATE, p);
+       {
+         FOR_REPO_SOLVABLES(installed, p, s)
+           queue_push2(q, DISABLE_UPDATE, p);
+       }
       FOR_JOB_SELECT(p, pp, select, what)
        if (pool->solvables[p].repo == installed)
          {
@@ -3956,8 +3958,10 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded)
          what = job->elements[i + 1];
          select = how & SOLVER_SELECTMASK;
          if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
-           FOR_REPO_SOLVABLES(installed, p, s)
-             MAPSET(&userinstalled, p - installed->start);
+           {
+             FOR_REPO_SOLVABLES(installed, p, s)
+               MAPSET(&userinstalled, p - installed->start);
+           }
          FOR_JOB_SELECT(p, pp, select, what)
            if (pool->solvables[p].repo == installed)
              MAPSET(&userinstalled, p - installed->start);
index 6b89ab0ede9659cf9682ec0e9e4b0c8c58118e66..37c618489a03b06a42f9da4044379f261cd6f063 100644 (file)
@@ -53,8 +53,10 @@ selection_prune(Pool *pool, Queue *selection)
          Solvable *s;
          Repo *repo = pool_id2repo(pool, selection->elements[i + 1]);
          if (repo)
-           FOR_REPO_SOLVABLES(repo, p, s)
-             break;
+           {
+             FOR_REPO_SOLVABLES(repo, p, s)
+               break;
+           }
        }
       else
        {
@@ -96,8 +98,10 @@ selection_solvables(Pool *pool, Queue *selection, Queue *pkgs)
          Solvable *s;
          Repo *repo = pool_id2repo(pool, selection->elements[i + 1]);
          if (repo)
-           FOR_REPO_SOLVABLES(repo, p, s)
-             queue_push(pkgs, p);
+           {
+             FOR_REPO_SOLVABLES(repo, p, s)
+               queue_push(pkgs, p);
+           }
        }
       else
        {
@@ -1100,8 +1104,10 @@ selection_filter(Pool *pool, Queue *sel1, Queue *sel2)
          Solvable *s;
          Repo *repo = pool_id2repo(pool, sel2->elements[i + 1]);
          if (repo)
-           FOR_REPO_SOLVABLES(repo, p, s)
-             map_set(&m2, p);
+           {
+             FOR_REPO_SOLVABLES(repo, p, s)
+               map_set(&m2, p);
+           }
        }
       else
        {
@@ -1163,13 +1169,15 @@ selection_filter(Pool *pool, Queue *sel1, Queue *sel2)
          Solvable *s;
          Repo *repo = pool_id2repo(pool, sel1->elements[i + 1]);
          if (repo)
-           FOR_REPO_SOLVABLES(repo, p, s)
-             {
-               if (map_tst(&m2, p))
-                 queue_push(&q1, p);
-               else
-                 miss = 1;
-             }
+           {
+             FOR_REPO_SOLVABLES(repo, p, s)
+               {
+                 if (map_tst(&m2, p))
+                   queue_push(&q1, p);
+                 else
+                   miss = 1;
+               }
+           }
        }
       else
        {
index 5fca20d1408901afe05b1474a2c2e44e7cb49463..047c847dc6bae58981b9b9f351d096e93181a894 100644 (file)
@@ -3141,8 +3141,10 @@ solver_calculate_multiversionmap(Pool *pool, Queue *job, Map *multiversionmap)
          Solvable *s;
          Repo *repo = pool_id2repo(pool, what);
          if (repo)
-           FOR_REPO_SOLVABLES(repo, p, s)
-             MAPSET(multiversionmap, p);
+           {
+             FOR_REPO_SOLVABLES(repo, p, s)
+               MAPSET(multiversionmap, p);
+           }
        }
       FOR_JOB_SELECT(p, pp, select, what)
         MAPSET(multiversionmap, p);
@@ -4023,8 +4025,10 @@ solver_solve(Solver *solv, Queue *job)
            {
              Repo *repo = pool_id2repo(pool, what);
              if (repo)
-               FOR_REPO_SOLVABLES(repo, p, s)
-                 solver_addjobrule(solv, installed && pool->solvables[p].repo == installed ? p : -p, 0, 0, i, weak);
+               {
+                 FOR_REPO_SOLVABLES(repo, p, s)
+                   solver_addjobrule(solv, installed && pool->solvables[p].repo == installed ? p : -p, 0, 0, i, weak);
+               }
            }
          FOR_JOB_SELECT(p, pp, select, what)
            solver_addjobrule(solv, installed && pool->solvables[p].repo == installed ? p : -p, 0, 0, i, weak);
@@ -4716,8 +4720,10 @@ pool_job2solvables(Pool *pool, Queue *pkgs, Id how, Id what)
       Repo *repo = pool_id2repo(pool, what);
       Solvable *s;
       if (repo)
-       FOR_REPO_SOLVABLES(repo, p, s)
-         queue_push(pkgs, p);
+       {
+         FOR_REPO_SOLVABLES(repo, p, s)
+           queue_push(pkgs, p);
+       }
     }
   else
     {
@@ -4873,8 +4879,10 @@ solver_get_userinstalled(Solver *solv, Queue *q, int flags)
          what = solv->job.elements[i + 1];
          select = how & SOLVER_SELECTMASK;
          if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
-           FOR_REPO_SOLVABLES(installed, p, s)
-             MAPSET(&userinstalled, p - installed->start);
+           {
+             FOR_REPO_SOLVABLES(installed, p, s)
+               MAPSET(&userinstalled, p - installed->start);
+           }
          FOR_JOB_SELECT(p, pp, select, what)
            if (pool->solvables[p].repo == installed)
              MAPSET(&userinstalled, p - installed->start);