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/be_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/be_sync.c') diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 81f3e46e..b11499c4 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -212,7 +212,7 @@ static int sync_db_populate(pmdb_t *db) } } - db->pkgcache = alpm_list_msort(db->pkgcache, count, _alpm_pkg_cmp); + db->pkgcache = alpm_list_msort(db->pkgcache, (size_t)count, _alpm_pkg_cmp); archive_read_finish(archive); return(count); -- cgit v1.2.3