From: Michael Schroeder Date: Fri, 2 Sep 2016 14:26:10 +0000 (+0200) Subject: Get rid of gcc-6 warnings X-Git-Tag: 0.6.24~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7a25c069125e68cfd66185b5151df10a8979881;p=thirdparty%2Flibsolv.git Get rid of gcc-6 warnings --- diff --git a/examples/solv/patchjobs.c b/examples/solv/patchjobs.c index 64ad6077..929a2033 100644 --- a/examples/solv/patchjobs.c +++ b/examples/solv/patchjobs.c @@ -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++) diff --git a/src/order.c b/src/order.c index d560865c..4fe3e08c 100644 --- a/src/order.c +++ b/src/order.c @@ -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++) { diff --git a/src/rules.c b/src/rules.c index aa90b5f4..67f10d89 100644 --- a/src/rules.c +++ b/src/rules.c @@ -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); diff --git a/src/selection.c b/src/selection.c index 6b89ab0e..37c61848 100644 --- a/src/selection.c +++ b/src/selection.c @@ -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 { diff --git a/src/solver.c b/src/solver.c index 5fca20d1..047c847d 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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);