diff --git a/bin/xbps-install/defs.h b/bin/xbps-install/defs.h index 5559b300..b6638bed 100644 --- a/bin/xbps-install/defs.h +++ b/bin/xbps-install/defs.h @@ -37,8 +37,8 @@ struct xferstat { /* from transaction.c */ int install_new_pkg(struct xbps_handle *, const char *, bool); int update_pkg(struct xbps_handle *, const char *); -int dist_upgrade(struct xbps_handle *, size_t, bool, bool); -int exec_transaction(struct xbps_handle *, size_t, bool, bool); +int dist_upgrade(struct xbps_handle *, int, bool, bool); +int exec_transaction(struct xbps_handle *, int, bool, bool); /* from question.c */ bool yesno(const char *, ...); @@ -51,7 +51,7 @@ void fetch_file_progress_cb(struct xbps_fetch_cb_data *, void *); void state_cb(struct xbps_state_cb_data *, void *); /* From util.c */ -void print_package_line(const char *, size_t, bool); -size_t get_maxcols(void); +void print_package_line(const char *, int, bool); +int get_maxcols(void); #endif /* !_XBPS_INSTALL_DEFS_H_ */ diff --git a/bin/xbps-install/main.c b/bin/xbps-install/main.c index 32c528c9..754d53df 100644 --- a/bin/xbps-install/main.c +++ b/bin/xbps-install/main.c @@ -102,7 +102,7 @@ main(int argc, char **argv) const char *rootdir, *cachedir, *conffile, *defrepo; int i, c, flags, rv, fflag = 0; bool sync, yes, reinstall, drun, update; - size_t maxcols; + int maxcols; rootdir = cachedir = conffile = defrepo = NULL; flags = rv = 0; diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c index cc25e981..ec350fde 100644 --- a/bin/xbps-install/transaction.c +++ b/bin/xbps-install/transaction.c @@ -48,7 +48,7 @@ struct transaction { static void show_missing_deps(prop_array_t a) { - size_t i; + unsigned int i; const char *str; fprintf(stderr, "Unable to locate some required packages:\n"); @@ -61,7 +61,7 @@ show_missing_deps(prop_array_t a) static void show_conflicts(prop_array_t a) { - size_t i; + unsigned int i; const char *str; fprintf(stderr, "Conflicting packages were found:\n"); @@ -93,7 +93,7 @@ show_actions(prop_object_iterator_t iter) } static void -show_package_list(prop_object_iterator_t iter, const char *match, size_t cols) +show_package_list(prop_object_iterator_t iter, const char *match, int cols) { prop_object_t obj; const char *pkgver, *tract; @@ -110,7 +110,7 @@ show_package_list(prop_object_iterator_t iter, const char *match, size_t cols) } static int -show_transaction_sizes(struct transaction *trans, size_t cols) +show_transaction_sizes(struct transaction *trans, int cols) { uint64_t dlsize = 0, instsize = 0, rmsize = 0; char size[8]; @@ -186,7 +186,7 @@ show_transaction_sizes(struct transaction *trans, size_t cols) } int -dist_upgrade(struct xbps_handle *xhp, size_t cols, bool yes, bool drun) +dist_upgrade(struct xbps_handle *xhp, int cols, bool yes, bool drun) { int rv = 0; @@ -256,7 +256,7 @@ update_pkg(struct xbps_handle *xhp, const char *pkgname) } int -exec_transaction(struct xbps_handle *xhp, size_t maxcols, bool yes, bool drun) +exec_transaction(struct xbps_handle *xhp, int maxcols, bool yes, bool drun) { prop_array_t mdeps, cflicts; struct transaction *trans; diff --git a/bin/xbps-install/util.c b/bin/xbps-install/util.c index dccf7701..9d7be1c2 100644 --- a/bin/xbps-install/util.c +++ b/bin/xbps-install/util.c @@ -35,7 +35,7 @@ #include #include "defs.h" -size_t +int get_maxcols(void) { struct winsize ws; @@ -47,9 +47,9 @@ get_maxcols(void) } void -print_package_line(const char *str, size_t maxcols, bool reset) +print_package_line(const char *str, int maxcols, bool reset) { - static size_t cols; + static int cols; static bool first; if (reset) { diff --git a/bin/xbps-pkgdb/check_pkg_rundeps.c b/bin/xbps-pkgdb/check_pkg_rundeps.c index ed43da56..5da6e8f6 100644 --- a/bin/xbps-pkgdb/check_pkg_rundeps.c +++ b/bin/xbps-pkgdb/check_pkg_rundeps.c @@ -49,7 +49,7 @@ check_pkg_rundeps(struct xbps_handle *xhp, const char *pkgname, void *arg) { prop_dictionary_t pkg_propsd = arg; prop_array_t array; - size_t i; + unsigned int i; const char *reqpkg; bool test_broken = false; diff --git a/bin/xbps-pkgdb/check_pkg_symlinks.c b/bin/xbps-pkgdb/check_pkg_symlinks.c index 06a86b83..64ac710b 100644 --- a/bin/xbps-pkgdb/check_pkg_symlinks.c +++ b/bin/xbps-pkgdb/check_pkg_symlinks.c @@ -77,7 +77,7 @@ check_pkg_symlinks(struct xbps_handle *xhp, const char *pkgname, void *arg) prop_array_t array; prop_object_t obj; prop_dictionary_t filesd = arg; - size_t i; + unsigned int i; const char *file, *tgt = NULL; char *path, *p, *buf, *buf2, *lnk, *dname, *tgt_path; int rv; diff --git a/bin/xbps-pkgdb/convert.c b/bin/xbps-pkgdb/convert.c index 8b01b104..598d1e2d 100644 --- a/bin/xbps-pkgdb/convert.c +++ b/bin/xbps-pkgdb/convert.c @@ -46,7 +46,7 @@ pkgdb_format_021(struct xbps_handle *xhp, const char *plist_new) { prop_array_t array, rdeps; prop_dictionary_t pkgdb, pkgd; - size_t i; + unsigned int i; char *pkgname, *plist; plist = xbps_xasprintf("%s/pkgdb.plist", xhp->metadir); diff --git a/bin/xbps-query/defs.h b/bin/xbps-query/defs.h index a6fc41b8..6b622968 100644 --- a/bin/xbps-query/defs.h +++ b/bin/xbps-query/defs.h @@ -55,8 +55,8 @@ int ownedby(struct xbps_handle *, int, char **); int repo_ownedby(struct xbps_handle *, int, char **); /* From list.c */ -size_t get_maxcols(void); -size_t find_longest_pkgver(struct xbps_handle *, prop_object_t); +int get_maxcols(void); +unsigned int find_longest_pkgver(struct xbps_handle *, prop_object_t); int list_pkgs_in_dict(struct xbps_handle *, prop_object_t, void *, bool *); int list_manual_pkgs(struct xbps_handle *, prop_object_t, void *, bool *); diff --git a/bin/xbps-query/list.c b/bin/xbps-query/list.c index 5e27e497..c12836b2 100644 --- a/bin/xbps-query/list.c +++ b/bin/xbps-query/list.c @@ -34,11 +34,11 @@ #include "defs.h" struct list_pkgver_cb { - size_t pkgver_len; - size_t maxcols; + int pkgver_len; + int maxcols; }; -size_t +int get_maxcols(void) { struct winsize ws; @@ -58,7 +58,7 @@ list_pkgs_in_dict(struct xbps_handle *xhp, struct list_pkgver_cb *lpc = arg; const char *pkgver, *short_desc, *state_str; char tmp[255], *out = NULL; - size_t i, len = 0; + int i, len = 0; pkg_state_t state; (void)xhp; @@ -167,8 +167,8 @@ repo_list_uri_cb(struct xbps_repo *repo, void *arg, bool *done) (void)arg; (void)done; - printf("%s (%zu packages)\n", repo->uri, - (size_t)prop_dictionary_count(repo->idx)); + printf("%s (%u packages)\n", repo->uri, + prop_dictionary_count(repo->idx)); return 0; } @@ -189,7 +189,7 @@ repo_list(struct xbps_handle *xhp) struct fflongest { prop_dictionary_t d; - size_t len; + unsigned int len; }; static int @@ -201,7 +201,7 @@ _find_longest_pkgver_cb(struct xbps_handle *xhp, struct fflongest *ffl = arg; prop_dictionary_t pkgd; const char *pkgver; - size_t len; + unsigned int len; (void)xhp; (void)loop_done; @@ -219,7 +219,7 @@ _find_longest_pkgver_cb(struct xbps_handle *xhp, return 0; } -size_t +unsigned int find_longest_pkgver(struct xbps_handle *xhp, prop_object_t o) { struct fflongest ffl; diff --git a/bin/xbps-query/ownedby.c b/bin/xbps-query/ownedby.c index ab819e7c..f60e0b37 100644 --- a/bin/xbps-query/ownedby.c +++ b/bin/xbps-query/ownedby.c @@ -128,7 +128,7 @@ repo_match_files_by_pattern(prop_array_t files, struct ffdata *ffd) { const char *filestr; - size_t i; + unsigned int i; int x; for (i = 0; i < prop_array_count(files); i++) { diff --git a/bin/xbps-query/search.c b/bin/xbps-query/search.c index b09014bb..f96d858b 100644 --- a/bin/xbps-query/search.c +++ b/bin/xbps-query/search.c @@ -47,7 +47,7 @@ struct search_data { int npatterns; char **patterns; - size_t maxcols; + int maxcols; prop_array_t results; }; @@ -56,7 +56,7 @@ print_results(struct xbps_handle *xhp, struct search_data *sd) { const char *pkgver, *desc, *inststr; char tmp[256], *out; - size_t i, j, tlen = 0, len = 0; + unsigned int i, j, tlen = 0, len = 0; /* Iterate over results array and find out largest pkgver string */ for (i = 0; i < prop_array_count(sd->results); i++) { @@ -80,7 +80,7 @@ print_results(struct xbps_handle *xhp, struct search_data *sd) inststr = "[-]"; len = strlen(inststr) + strlen(tmp) + strlen(desc) + 3; - if (len > sd->maxcols) { + if ((int)len > sd->maxcols) { out = malloc(sd->maxcols+1); assert(out); snprintf(out, sd->maxcols-3, "%s %s %s", @@ -103,7 +103,7 @@ search_pkgs_cb(struct xbps_repo *repo, void *arg, bool *done) prop_dictionary_keysym_t ksym; struct search_data *sd = arg; const char *pkgver, *desc; - size_t i; + unsigned int i; int x; (void)done; @@ -120,7 +120,7 @@ search_pkgs_cb(struct xbps_repo *repo, void *arg, bool *done) provides = prop_dictionary_get(pkgd, "provides"); for (x = 0; x < sd->npatterns; x++) { - size_t j; + unsigned int j; bool vpkgfound = false; for (j = 0; j < prop_array_count(provides); j++) { diff --git a/bin/xbps-query/show-deps.c b/bin/xbps-query/show-deps.c index b68c151f..8be38e6d 100644 --- a/bin/xbps-query/show-deps.c +++ b/bin/xbps-query/show-deps.c @@ -40,7 +40,7 @@ print_rdeps(struct xbps_handle *xhp, prop_array_t rdeps, prop_array_t currdeps; prop_dictionary_t pkgd; const char *pkgdep; - size_t i; + unsigned int i; int j; if (!origin) @@ -98,7 +98,7 @@ show_pkg_revdeps(struct xbps_handle *xhp, const char *pkg) { prop_array_t reqby; const char *pkgdep; - size_t i; + unsigned int i; if ((reqby = xbps_pkgdb_get_pkg_revdeps(xhp, pkg)) != NULL) { for (i = 0; i < prop_array_count(reqby); i++) { diff --git a/bin/xbps-query/show-info-files.c b/bin/xbps-query/show-info-files.c index d7227f9b..51f5342d 100644 --- a/bin/xbps-query/show-info-files.c +++ b/bin/xbps-query/show-info-files.c @@ -43,7 +43,7 @@ print_value_obj(const char *keyname, prop_object_t obj, prop_array_t allkeys; prop_object_t obj2, keysym; const char *ksymname, *value; - size_t i; + unsigned int i; char size[8]; if (indent == NULL) @@ -151,7 +151,7 @@ static void print_srcrevs(const char *keyname, prop_string_t obj) { const char *str = prop_string_cstring_nocopy(obj); - size_t i; + unsigned int i; /* parse string appending a \t after EOL */ printf("%s:\n ", keyname); @@ -170,7 +170,7 @@ show_pkg_info(prop_dictionary_t dict) prop_array_t all_keys; prop_object_t obj, keysym; const char *keyname; - size_t i; + unsigned int i; all_keys = prop_dictionary_all_keys(dict); for (i = 0; i < prop_array_count(all_keys); i++) { @@ -201,7 +201,7 @@ show_pkg_files(prop_dictionary_t filesd) prop_object_t obj; prop_dictionary_keysym_t ksym; const char *keyname, *file; - size_t i, x; + unsigned int i, x; if (prop_object_type(filesd) != PROP_TYPE_DICTIONARY) return EINVAL; diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c index 30c53661..d0fa7cbc 100644 --- a/bin/xbps-remove/main.c +++ b/bin/xbps-remove/main.c @@ -183,12 +183,12 @@ cachedir_clean(struct xbps_handle *xhp) } static int -remove_pkg(struct xbps_handle *xhp, const char *pkgname, size_t cols, +remove_pkg(struct xbps_handle *xhp, const char *pkgname, int cols, bool recursive) { prop_array_t reqby; const char *pkgver; - size_t x; + unsigned int x; int rv; rv = xbps_transaction_remove_pkg(xhp, pkgname, recursive); @@ -243,7 +243,7 @@ main(int argc, char **argv) int i, c, flags, rv; bool yes, drun, recursive, ignore_revdeps, clean_cache; bool orphans, reqby_force; - size_t maxcols; + int maxcols; rootdir = cachedir = conffile = NULL; flags = rv = 0; diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index b497b8fb..72454570 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -54,7 +54,7 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) const char *oldpkgver, *arch, *oldarch; char *pkgver, *pkgname, *sha256, *repodir, *buf; char *tmprepodir; - size_t x; + unsigned int x; int i, rv, ret = 0; bool flush = false, found = false; diff --git a/bin/xbps-rindex/index-clean.c b/bin/xbps-rindex/index-clean.c index ef6aa32e..d1eccca8 100644 --- a/bin/xbps-rindex/index-clean.c +++ b/bin/xbps-rindex/index-clean.c @@ -143,7 +143,7 @@ index_clean(struct xbps_handle *xhp, const char *repodir) prop_dictionary_t idx, idxfiles; const char *keyname; char *pkgname; - size_t x, pkgcount, slicecount; + unsigned int x, pkgcount, slicecount; int i, maxthreads, rv = 0; bool flush = false; diff --git a/bin/xbps-rindex/remove-obsoletes.c b/bin/xbps-rindex/remove-obsoletes.c index 0256de2b..b844909d 100644 --- a/bin/xbps-rindex/remove-obsoletes.c +++ b/bin/xbps-rindex/remove-obsoletes.c @@ -138,7 +138,7 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir) struct dirent *dp; char *ext; int i, maxthreads, rv = 0; - size_t slicecount, pkgcount; + unsigned int slicecount, pkgcount; repo = xbps_repo_open(xhp, repodir); if (repo == NULL) { diff --git a/lib/package_config_files.c b/lib/package_config_files.c index 9e4ba726..ba20df43 100644 --- a/lib/package_config_files.c +++ b/lib/package_config_files.c @@ -39,7 +39,7 @@ xbps_entry_is_a_conf_file(prop_dictionary_t propsd, { prop_array_t array; const char *cffile; - size_t i; + unsigned int i; assert(prop_object_type(propsd) == PROP_TYPE_DICTIONARY); assert(entry_pname != NULL); diff --git a/lib/package_find_obsoletes.c b/lib/package_find_obsoletes.c index 51d6ddb4..8971ef82 100644 --- a/lib/package_find_obsoletes.c +++ b/lib/package_find_obsoletes.c @@ -37,7 +37,7 @@ merge_filelist(prop_dictionary_t d) { prop_array_t a, result; prop_dictionary_t filed; - size_t i; + unsigned int i; result = prop_array_create(); assert(result); @@ -78,7 +78,7 @@ xbps_find_pkg_obsoletes(struct xbps_handle *xhp, prop_array_t instfiles, newfiles, obsoletes; prop_object_t obj, obj2; prop_string_t oldstr, newstr; - size_t i, x; + unsigned int i, x; const char *oldhash; char *file; int rv = 0; diff --git a/lib/package_orphans.c b/lib/package_orphans.c index 9027884f..56491154 100644 --- a/lib/package_orphans.c +++ b/lib/package_orphans.c @@ -68,7 +68,7 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, prop_array_t orphans_user) prop_object_iterator_t iter; const char *curpkgver, *deppkgver, *reqbydep; bool automatic = false; - size_t i, x, j, cnt, reqbycnt; + unsigned int i, x, j, cnt, reqbycnt; (void)orphans_user; diff --git a/lib/package_script.c b/lib/package_script.c index 32b5ca4f..5ef4b90c 100644 --- a/lib/package_script.c +++ b/lib/package_script.c @@ -115,7 +115,10 @@ xbps_pkg_exec_script(struct xbps_handle *xhp, bool update) { prop_data_t data; + void *buf; + size_t buflen; const char *pkgver; + int rv; assert(xhp); assert(d); @@ -128,6 +131,10 @@ xbps_pkg_exec_script(struct xbps_handle *xhp, prop_dictionary_get_cstring_nocopy(d, "pkgver", &pkgver); - return xbps_pkg_exec_buffer(xhp, prop_data_data(data), - prop_data_size(data), pkgver, action, update); + buf = prop_data_data(data); + buflen = prop_data_size(data); + rv = xbps_pkg_exec_buffer(xhp, buf, buflen, pkgver, action, update); + free(buf); + + return rv; } diff --git a/lib/package_state.c b/lib/package_state.c index 83221bcd..f6f39161 100644 --- a/lib/package_state.c +++ b/lib/package_state.c @@ -166,6 +166,7 @@ xbps_set_pkg_state_installed(struct xbps_handle *xhp, return EINVAL; } free(pkgname); + prop_object_release(pkgd); } else { if ((rv = set_new_state(pkgd, state)) != 0) return rv; diff --git a/lib/package_unpack.c b/lib/package_unpack.c index 390e9220..2563ad9e 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -57,7 +57,7 @@ find_pkg_symlink_target(prop_dictionary_t d, const char *file) { prop_array_t links; prop_object_t obj; - size_t i; + unsigned int i; const char *pkgfile, *tgt = NULL; char *rfile; @@ -147,6 +147,7 @@ create_pkg_metaplist(struct xbps_handle *xhp, const char *pkgname, const char *p pkgver, buf, strerror(errno)); } free(buf); + prop_object_release(pkg_metad); return rv; } diff --git a/lib/pkgdb.c b/lib/pkgdb.c index 256a447a..29d2fd57 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -143,7 +143,7 @@ xbps_pkgdb_foreach_reverse_cb(struct xbps_handle *xhp, prop_array_t allkeys; prop_object_t obj; prop_dictionary_t pkgd; - size_t i; + unsigned int i; int rv; bool done = false; diff --git a/lib/plist.c b/lib/plist.c index c7ec3f47..181b2eaa 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -110,7 +110,7 @@ xbps_callback_array_iter_in_dict(struct xbps_handle *xhp, { prop_object_t obj; prop_array_t array; - size_t i; + unsigned int i; int rv = 0; bool cbloop_done = false; @@ -212,7 +212,7 @@ array_replace_dict(prop_array_t array, bool bypattern) { prop_object_t obj; - size_t i; + unsigned int i; const char *curpkgver; char *curpkgname; diff --git a/lib/plist_find.c b/lib/plist_find.c index 0581be9c..c144e7ef 100644 --- a/lib/plist_find.c +++ b/lib/plist_find.c @@ -183,7 +183,7 @@ vpkg_user_conf(struct xbps_handle *xhp, { const char *vpkgver, *pkg = NULL; char *vpkgname = NULL, *tmp; - size_t i, j, cnt; + unsigned int i, j, cnt; if (xhp->cfg == NULL) return NULL; diff --git a/lib/plist_remove.c b/lib/plist_remove.c index 99061598..766b8e43 100644 --- a/lib/plist_remove.c +++ b/lib/plist_remove.c @@ -38,7 +38,7 @@ remove_obj_from_array(prop_array_t array, const char *str, int mode) prop_object_t obj; const char *curname, *pkgdep; char *curpkgname; - size_t idx = 0; + unsigned int idx = 0; bool found = false; assert(prop_object_type(array) == PROP_TYPE_ARRAY); diff --git a/lib/repo_pkgdeps.c b/lib/repo_pkgdeps.c index 5e8d5318..ba08e93e 100644 --- a/lib/repo_pkgdeps.c +++ b/lib/repo_pkgdeps.c @@ -64,7 +64,7 @@ add_missing_reqdep(struct xbps_handle *xhp, const char *reqpkg) prop_string_t reqpkg_str; prop_object_iterator_t iter = NULL; prop_object_t obj; - size_t idx = 0; + unsigned int idx = 0; bool add_pkgdep, pkgfound, update_pkgdep; int rv = 0; @@ -150,14 +150,14 @@ find_repo_deps(struct xbps_handle *xhp, prop_array_t unsorted, /* array of unsorted deps */ prop_array_t pkg_rdeps_array, /* current pkg rundeps array */ const char *curpkg, /* current pkgver */ - size_t *depth) /* max recursion depth */ + unsigned short *depth) /* max recursion depth */ { prop_dictionary_t curpkgd, tmpd; prop_object_t obj; prop_object_iterator_t iter; prop_array_t curpkgrdeps; pkg_state_t state; - size_t x; + unsigned int x; const char *reqpkg, *pkgver_q, *reason = NULL; char *pkgname, *reqpkgname; int rv = 0; @@ -389,7 +389,7 @@ xbps_repository_find_deps(struct xbps_handle *xhp, { prop_array_t pkg_rdeps; const char *pkgver; - size_t depth = 0; + unsigned short depth = 0; pkg_rdeps = prop_dictionary_get(repo_pkgd, "run_depends"); if (prop_object_type(pkg_rdeps) != PROP_TYPE_ARRAY) diff --git a/lib/rpool.c b/lib/rpool.c index 153ed636..927f6903 100644 --- a/lib/rpool.c +++ b/lib/rpool.c @@ -119,7 +119,7 @@ int xbps_rpool_sync(struct xbps_handle *xhp, const char *uri) { const char *repouri; - size_t i; + unsigned int i; if (xhp->cfg == NULL) return ENOTSUP; diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index 373d2c95..8b9b351c 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -193,7 +193,7 @@ xbps_transaction_update_packages(struct xbps_handle *xhp) char *pkgname; bool foundhold = false, newpkg_found = false; int rv = 0; - size_t x; + unsigned int x; if ((rv = xbps_pkgdb_init(xhp)) != 0) return rv; @@ -273,7 +273,7 @@ xbps_transaction_remove_pkg(struct xbps_handle *xhp, prop_array_t unsorted, orphans, orphans_pkg, reqby; prop_object_t obj; const char *pkgver; - size_t count; + unsigned int count; int rv = 0; assert(pkgname != NULL); @@ -351,7 +351,7 @@ xbps_transaction_autoremove_pkgs(struct xbps_handle *xhp) prop_array_t orphans, unsorted; prop_object_t obj; const char *pkgver; - size_t count; + unsigned int count; int rv = 0; orphans = xbps_find_pkg_orphans(xhp, NULL); diff --git a/lib/transaction_package_replace.c b/lib/transaction_package_replace.c index c4afe618..2a4bbb01 100644 --- a/lib/transaction_package_replace.c +++ b/lib/transaction_package_replace.c @@ -43,7 +43,7 @@ xbps_transaction_package_replace(struct xbps_handle *xhp) const char *pattern, *pkgver, *curpkgver; char *buf, *pkgname, *curpkgname; bool instd_auto, sr; - size_t i; + unsigned int i; unsorted = prop_dictionary_get(xhp->transd, "unsorted_deps"); diff --git a/lib/transaction_sortdeps.c b/lib/transaction_sortdeps.c index 4d7ba1f1..bae7fd49 100644 --- a/lib/transaction_sortdeps.c +++ b/lib/transaction_sortdeps.c @@ -87,11 +87,11 @@ pkgdep_find(const char *pkg) return NULL; } -static ssize_t +static int32_t pkgdep_find_idx(const char *pkg) { struct pkgdep *pd, *pd_new; - ssize_t idx = 0; + int32_t idx = 0; const char *pkgver, *tract; TAILQ_FOREACH_SAFE(pd, &pkgdep_list, pkgdep_entries, pd_new) { @@ -167,8 +167,8 @@ sort_pkg_rundeps(struct xbps_handle *xhp, prop_dictionary_t curpkgd; struct pkgdep *lpd, *pdn; const char *str, *tract; - ssize_t pkgdepidx, curpkgidx; - size_t i, idx = 0; + int32_t pkgdepidx, curpkgidx; + uint32_t i, idx = 0; int rv = 0; xbps_dbg_printf_append(xhp, "\n"); @@ -258,7 +258,7 @@ xbps_transaction_sort(struct xbps_handle *xhp) prop_array_t provides, sorted, unsorted, rundeps; prop_object_t obj; struct pkgdep *pd; - size_t i, j, ndeps = 0, cnt = 0; + unsigned int i, j, ndeps = 0, cnt = 0; const char *pkgname, *pkgver, *tract, *vpkgdep; int rv = 0; bool vpkg_found; diff --git a/lib/util.c b/lib/util.c index 88e3d7a8..34cac402 100644 --- a/lib/util.c +++ b/lib/util.c @@ -121,7 +121,7 @@ xbps_pkg_name(const char *pkg) { const char *p; char *buf; - size_t len; + unsigned int len; if ((p = strrchr(pkg, '-')) == NULL) return NULL; @@ -143,7 +143,7 @@ char * xbps_pkgpattern_name(const char *pkg) { char *res, *pkgname; - size_t len; + unsigned int len; assert(pkg != NULL);