- actually "unsigned long" is wrong, too. It should be "size_t" and
authorMichael Schroeder <mls@suse.de>
Wed, 5 Nov 2008 13:46:27 +0000 (13:46 +0000)
committerMichael Schroeder <mls@suse.de>
Wed, 5 Nov 2008 13:46:27 +0000 (13:46 +0000)
  "%z". But I don't see why the arithmetics have to be 64bit, going
  the other way instead by casting to "int".

src/pool.c
src/repo_helix.c
src/repo_solv.c
src/solver.c
tools/repo_rpmdb.c
tools/repo_rpmmd.c

index 89e43d3..1e8d17d 100644 (file)
@@ -356,7 +356,7 @@ pool_createwhatprovides(Pool *pool)
   pool->whatprovidesdataoff = off;
   pool->whatprovidesdataleft = extra;
   pool_shrink_whatprovides(pool);
-  POOL_DEBUG(SAT_DEBUG_STATS, "whatprovides memory used: %ld K id array, %ld K data\n", ((unsigned long)pool->ss.nstrings + pool->nrels + WHATPROVIDES_BLOCK) / (1024/sizeof(Id)), ((unsigned long)pool->whatprovidesdataoff + pool->whatprovidesdataleft) / (1024/sizeof(Id)));
+  POOL_DEBUG(SAT_DEBUG_STATS, "whatprovides memory used: %d K id array, %d K data\n", (pool->ss.nstrings + pool->nrels + WHATPROVIDES_BLOCK) / (int)(1024/sizeof(Id)), (pool->whatprovidesdataoff + pool->whatprovidesdataleft) / (int)(1024/sizeof(Id)));
   POOL_DEBUG(SAT_DEBUG_STATS, "createwhatprovides took %d ms\n", sat_timems(now));
 }
 
index 6b31ab2..cd64e10 100644 (file)
@@ -876,5 +876,5 @@ repo_add_helix(Repo *repo, FILE *fp, int flags)
     repodata_internalize(data);
   POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_helix took %d ms\n", sat_timems(now));
   POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
-  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %ld K incore, %ld K idarray\n", (unsigned long)data->incoredatalen/1024, (unsigned long)repo->idarraysize / (1024/sizeof(Id)));
+  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n", data->incoredatalen/1024, repo->idarraysize / (int)(1024/sizeof(Id)));
 }
index ec1df79..89bd41e 100644 (file)
@@ -1369,7 +1369,7 @@ printf("=> %s %s %p\n", id2str(pool, keys[key].name), id2str(pool, keys[key].typ
 
   POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_solv took %d ms\n", sat_timems(now));
   POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
-  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %ld K incore, %ld K idarray\n", (unsigned long)data.incoredatalen/1024, (unsigned long)repo->idarraysize / (1024/sizeof(Id)));
+  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n", data.incoredatalen/1024, repo->idarraysize / (int)(1024/sizeof(Id)));
   return 0;
 }
 
index 85a661e..efda504 100644 (file)
@@ -4108,7 +4108,7 @@ solver_solve(Solver *solv, Queue *job)
   solv->rpmrules_end = solv->nrules;              /* mark end of rpm rules */
 
   solv->directdecisions = solv->decisionq.count;
-  POOL_DEBUG(SAT_DEBUG_STATS, "rpm rule memory usage: %ld K\n", (unsigned long)solv->nrules * sizeof(Rule) / 1024);
+  POOL_DEBUG(SAT_DEBUG_STATS, "rpm rule memory usage: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
   POOL_DEBUG(SAT_DEBUG_STATS, "decisions so far: %d\n", solv->decisionq.count);
   POOL_DEBUG(SAT_DEBUG_STATS, "rpm rule creation took %d ms\n", sat_timems(now));
 
index cb2f80d..e7b4596 100644 (file)
@@ -1623,7 +1623,7 @@ repo_add_rpmdb(Repo *repo, Repo *ref, const char *rootdir, int flags)
     pool_debug(pool, SAT_ERROR, "%%%% 100\n");
   POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_rpmdb took %d ms\n", sat_timems(now));
   POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
-  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %ld K incore, %ld K idarray\n", (unsigned long)data->incoredatalen/1024, (unsigned long)repo->idarraysize / (1024/sizeof(Id)));
+  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n", data->incoredatalen/1024, repo->idarraysize / (int)(1024/sizeof(Id)));
 }
 
 
index 44ab8ee..49f873d 100644 (file)
@@ -1150,5 +1150,5 @@ repo_add_rpmmd(Repo *repo, FILE *fp, const char *language, int flags)
     repodata_internalize(data);
   POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_rpmmd took %d ms\n", sat_timems(now));
   POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
-  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %ld K incore, %ld K idarray\n", (unsigned long)data->incoredatalen/1024, (unsigned long)repo->idarraysize / (1024/sizeof(Id)));
+  POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n", data->incoredatalen/1024, repo->idarraysize / (int)(1024/sizeof(Id)));
 }