remove dead assignments (#109)
* remove dead assignments None of them are used. Signed-off-by: Igor Gnatenko <ignatenko@redhat.com> * The address of an object "&pkgconf_pkg_provides_vermatch_rules[pkgdep->compare]" is never null Signed-off-by: Igor Gnatenko <ignatenko@redhat.com> * Overrunning array pkgconf_pkg_comparator_names at element index 7 Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>pull/116/head
parent
5e5c418837
commit
5db87c9685
|
@ -208,7 +208,6 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends)
|
|||
|
||||
compare = PKGCONF_CMP_ANY;
|
||||
package_sz = 0;
|
||||
version_sz = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -254,7 +253,6 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends)
|
|||
cnameptr = cmpname;
|
||||
memset(cmpname, 0, sizeof cmpname);
|
||||
package_sz = 0;
|
||||
version_sz = 0;
|
||||
}
|
||||
|
||||
if (state == OUTSIDE_MODULE)
|
||||
|
|
|
@ -923,7 +923,7 @@ static const pkgconf_vercmp_res_func_t pkgconf_pkg_comparator_impls[] = {
|
|||
const char *
|
||||
pkgconf_pkg_get_comparator(const pkgconf_dependency_t *pkgdep)
|
||||
{
|
||||
if (pkgdep->compare > PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
|
||||
if (pkgdep->compare >= PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
|
||||
return "???";
|
||||
|
||||
return pkgconf_pkg_comparator_names[pkgdep->compare].name;
|
||||
|
@ -1063,9 +1063,6 @@ pkgconf_pkg_scan_provides_vercmp(const pkgconf_dependency_t *pkgdep, const pkgco
|
|||
{
|
||||
const pkgconf_pkg_provides_vermatch_rule_t *rule = &pkgconf_pkg_provides_vermatch_rules[pkgdep->compare];
|
||||
|
||||
if (rule == NULL)
|
||||
return false;
|
||||
|
||||
if (rule->depcmp[provider->compare] != NULL &&
|
||||
!rule->depcmp[provider->compare](provider->version, pkgdep->version))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue