From 32ffaf616c5dd02746e40a4b1f49ea332ac3383f Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 25 Jun 2012 11:26:57 +0200 Subject: [PATCH] - get rid of a couple of warnings when building for debian --- examples/solv.c | 16 +++++++++++----- tools/installcheck.c | 9 +++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/examples/solv.c b/examples/solv.c index f14d37f..4c8355f 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -1494,15 +1494,19 @@ int load_stub(Pool *pool, Repodata *data, void *dp) { struct repoinfo *cinfo = data->repo->appdata; + switch (cinfo->type) + { #ifdef ENABLE_SUSEREPO - if (cinfo->type == TYPE_SUSETAGS) - return susetags_load_ext(data->repo, data); + case TYPE_SUSETAGS: + return susetags_load_ext(data->repo, data); #endif #ifdef ENABLE_RPMMD - if (cinfo->type == TYPE_RPMMD) - return repomd_load_ext(data->repo, data); + case TYPE_RPMMD: + return repomd_load_ext(data->repo, data); #endif - return 0; + default: + return 0; + } } static unsigned char installedcookie[32]; @@ -1644,7 +1648,9 @@ read_repos(Pool *pool, struct repoinfo *repoinfos, int nrepoinfos) #endif struct stat stb; Pool *sigpool = 0; +#if defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) Repodata *data; +#endif int badchecksum; int dorefresh; #if defined(ENABLE_DEBIAN) diff --git a/tools/installcheck.c b/tools/installcheck.c index 4441049..3721682 100644 --- a/tools/installcheck.c +++ b/tools/installcheck.c @@ -60,7 +60,10 @@ main(int argc, char **argv) char *arch, *exclude_pat; int i, j; Id p; - Id rpmid, rpmarch, rpmrel, archlock; + Id rpmarch, rpmrel, archlock; +#ifndef DEBIAN + Id rpmid; +#endif int status = 0; int nocheck = 0; int withsrc = 0; @@ -157,10 +160,10 @@ main(int argc, char **argv) } pool_addfileprovides(pool); pool_createwhatprovides(pool); +#ifndef DEBIAN rpmid = pool_str2id(pool, "rpm", 0); rpmarch = pool_str2id(pool, arch, 0); rpmrel = 0; -#ifndef DEBIAN if (rpmid && rpmarch) { for (p = 1; p < pool->nsolvables; p++) @@ -172,6 +175,8 @@ main(int argc, char **argv) if (p < pool->nsolvables) rpmrel = pool_rel2id(pool, rpmid, rpmarch, REL_ARCH, 1); } +#else + rpmrel = rpmarch = 0; #endif queue_init(&job); -- 2.34.1