Fix all warnings found by clang analyzer as reported by ojab in issue 3.
This commit is contained in:
@@ -163,7 +163,7 @@ unpack_archive(prop_dictionary_t pkg_repod,
|
||||
void (*progress_cb)(void *),
|
||||
struct xbps_unpack_progress_data *xupd)
|
||||
{
|
||||
prop_dictionary_t propsd, filesd, old_filesd;
|
||||
prop_dictionary_t propsd = NULL, filesd = NULL, old_filesd = NULL;
|
||||
prop_array_t array;
|
||||
struct archive_entry *entry;
|
||||
size_t nmetadata = 0, entry_idx = 0;
|
||||
|
||||
@@ -76,7 +76,7 @@ store_dependency(prop_dictionary_t transd, prop_dictionary_t repo_pkgd)
|
||||
* Overwrite package state in dictionary if it was unpacked
|
||||
* previously.
|
||||
*/
|
||||
if ((rv = xbps_get_pkg_state_installed(pkgname, &state)) == 0) {
|
||||
if (xbps_get_pkg_state_installed(pkgname, &state) == 0) {
|
||||
if ((rv = xbps_set_pkg_state_dictionary(dict, state)) != 0) {
|
||||
prop_object_release(dict);
|
||||
return rv;
|
||||
@@ -216,7 +216,7 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
|
||||
* current package.
|
||||
*/
|
||||
while ((obj = prop_object_iterator_next(iter)) != NULL) {
|
||||
tmpd = curpkgd = NULL;
|
||||
curpkgd = NULL;
|
||||
reqpkg = prop_string_cstring_nocopy(obj);
|
||||
if (reqpkg == NULL) {
|
||||
rv = EINVAL;
|
||||
|
||||
@@ -93,7 +93,7 @@ repository_find_pkg(const char *pattern, const char *reason)
|
||||
|
||||
assert(pattern != NULL);
|
||||
assert(reason != NULL);
|
||||
success = install = bypattern = bestpkg = false;
|
||||
install = bypattern = false;
|
||||
|
||||
if (strcmp(reason, "install") == 0) {
|
||||
/* install */
|
||||
|
||||
Reference in New Issue
Block a user