- get rid of a couple of warnings when building for debian
authorMichael Schroeder <mls@suse.de>
Mon, 25 Jun 2012 09:26:57 +0000 (11:26 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 25 Jun 2012 09:26:57 +0000 (11:26 +0200)
examples/solv.c
tools/installcheck.c

index f14d37f78dea497f5282a1eaf98678f7dbefac14..4c8355ff64959e5734e59ee732f42b6a65fd7805 100644 (file)
@@ -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)
index 4441049dd4a353b6b9b974f51f903f42db7326ea..37216823ed3f8a7e4f582270a5ecb9045e355394 100644 (file)
@@ -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);