Remove unnecessary variable assignments reported by cppcheck.
This commit is contained in:
parent
c7402a9176
commit
310e619ea3
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user