]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- 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 89e43d39446e5a3ac85b6ceeb64578650732a9ba..1e8d17dc674d1431bda4c3e028772afeaf80297f 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 6b31ab29834b467cb5dccc91037b8b0d215fc63e..cd64e1085c0070e180a7a62f02c9e62918c9aa32 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 ec1df79dd27dce3911c7ff3d2b680f4cb5f81804..89bd41ec11625b4b451722dc975943c8cd6af813 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 85a661e5a0a5bc9f64abd1c5bd9029f804088970..efda5044a6d7066c7853e35bebe745715b2cc2c0 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 cb2f80d13a1cde67ffb1d7e4cce551cedd162188..e7b4596b46928cfee300497e497141b2290dd27f 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 44ab8eee32c979345eb61a89346682fae714d42f..49f873df50cd4d9126f517840b7877c2756a1978 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)));
 }