diff --git a/bin/xbps-query/main.c b/bin/xbps-query/main.c index f294672c..f3c39130 100644 --- a/bin/xbps-query/main.c +++ b/bin/xbps-query/main.c @@ -98,7 +98,7 @@ main(int argc, char **argv) rootdir = cachedir = conffile = defrepo = props = NULL; flags = rv = c = 0; list_pkgs = list_repos = orphans = search = own = false; - list_manual = show_prop = show_files = search = false; + list_manual = show_prop = show_files = false; show = show_deps = show_rdeps = false; repo_mode = opmode = false; diff --git a/lib/package_register.c b/lib/package_register.c index 2c98a4ef..9aa3f96f 100644 --- a/lib/package_register.c +++ b/lib/package_register.c @@ -43,7 +43,7 @@ int xbps_register_pkg(struct xbps_handle *xhp, prop_dictionary_t pkgrd, bool flush) { - prop_dictionary_t pkgd = NULL; + prop_dictionary_t pkgd; prop_array_t provides, reqby; char outstr[64]; time_t t; diff --git a/lib/package_remove.c b/lib/package_remove.c index 596a6976..c35c2f28 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -271,7 +271,7 @@ xbps_remove_pkg(struct xbps_handle *xhp, bool soft_replace) { prop_dictionary_t pkgd = NULL; - char *tmpname = NULL, *buf = NULL, *pkgver = NULL; + char *tmpname, *buf, *pkgver = NULL; const char *tmpver = NULL; int rv = 0; bool rmfile_exists = false; diff --git a/lib/package_unpack.c b/lib/package_unpack.c index f788eb35..52ef37f8 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -691,7 +691,7 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, prop_dictionary_t pkg_repod) { struct archive *ar = NULL; const char *pkgname, *version, *repoloc, *pkgver, *fname; - char *bpkg = NULL; + char *bpkg; int rv = 0; assert(prop_object_type(pkg_repod) == PROP_TYPE_DICTIONARY); diff --git a/lib/plist_archive_entry.c b/lib/plist_archive_entry.c index 449de626..5fb5285a 100644 --- a/lib/plist_archive_entry.c +++ b/lib/plist_archive_entry.c @@ -122,7 +122,7 @@ xbps_dictionary_from_archive_entry(struct archive *ar, struct archive_entry *entry) { prop_dictionary_t d = NULL; - size_t buflen = 0; + size_t buflen; ssize_t nbytes = -1; char *buf, *uncomp_buf; diff --git a/lib/util_hash.c b/lib/util_hash.c index bb19e2cd..beee838a 100644 --- a/lib/util_hash.c +++ b/lib/util_hash.c @@ -149,8 +149,6 @@ xbps_file_hash_dictionary(prop_dictionary_t d, assert(key != NULL); assert(file != NULL); - curfile = sha256 = NULL; - iter = xbps_array_iter_from_dict(d, key); if (iter == NULL) { errno = ENOENT;