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/diskspace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/diskspace.c') diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 624cd274..5c9f74e5 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -243,11 +243,11 @@ cleanup: int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local) { alpm_list_t *mount_points, *i; - int replaces = 0, abort = 0; + size_t replaces = 0, current = 0; + int abort = 0; alpm_list_t *targ; pmpkg_t *pkg; - int numtargs = alpm_list_count(trans->add); - int current = 0; + size_t numtargs = alpm_list_count(trans->add); mount_points = mount_point_list(); if(mount_points == NULL) { -- cgit v1.2.3-24-g4f1b