From: Michael Schroeder Date: Wed, 5 Nov 2008 13:46:27 +0000 (+0000) Subject: - actually "unsigned long" is wrong, too. It should be "size_t" and X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f41acbdf08531db1bad1064091efaf199f00a453;p=thirdparty%2Flibsolv.git - actually "unsigned long" is wrong, too. It should be "size_t" and "%z". But I don't see why the arithmetics have to be 64bit, going the other way instead by casting to "int". --- diff --git a/src/pool.c b/src/pool.c index 89e43d39..1e8d17dc 100644 --- a/src/pool.c +++ b/src/pool.c @@ -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)); } diff --git a/src/repo_helix.c b/src/repo_helix.c index 6b31ab29..cd64e108 100644 --- a/src/repo_helix.c +++ b/src/repo_helix.c @@ -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))); } diff --git a/src/repo_solv.c b/src/repo_solv.c index ec1df79d..89bd41ec 100644 --- a/src/repo_solv.c +++ b/src/repo_solv.c @@ -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; } diff --git a/src/solver.c b/src/solver.c index 85a661e5..efda5044 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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)); diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c index cb2f80d1..e7b4596b 100644 --- a/tools/repo_rpmdb.c +++ b/tools/repo_rpmdb.c @@ -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))); } diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 44ab8eee..49f873df 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -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))); }