From f966f3a8344cd96bd675c79a5c470c66920b890c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 8 Dec 2010 15:13:36 +1000 Subject: Use size_t for alpm_list sizes There is a lot of swtiching between size_t and int for alpm_list sizes in the codebase. Start converting these to all be size_t by adjusting the return type of alpm_list_count and fixing all additional warnings given by -Wconversion that are generated by this change. Dan: a few more small changes to ensure things compile, adjusting some printf format string characters to accommodate the larger size on x86_64. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 9fc0381c..2f341eb0 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -477,7 +477,7 @@ static int extract_single_file(struct archive *archive, return(errors); } -static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count, +static int commit_single_pkg(pmpkg_t *newpkg, size_t pkg_current, size_t pkg_count, pmtrans_t *trans, pmdb_t *db) { int i, ret = 0, errors = 0; @@ -715,7 +715,7 @@ cleanup: int _alpm_upgrade_packages(pmtrans_t *trans, pmdb_t *db) { - int pkg_count, pkg_current; + size_t pkg_count, pkg_current; int skip_ldconfig = 0, ret = 0; alpm_list_t *targ; -- cgit v1.2.3-24-g4f1b