Skip to content

Commit

Permalink
validator: Make sure we read an initialised variable
Browse files Browse the repository at this point in the history
We were not reading the kind so it was left undeclared.

src/as-validator.c:3534:7: warning: variable 'ckind' is uninitialized
when used here [-Wuninitialized]
  • Loading branch information
aleixpol authored and ximion committed Jul 9, 2024
1 parent 6efe972 commit da31a93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/as-validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3529,6 +3529,7 @@ as_validator_validate_component_node (AsValidator *validator, AsContext *ctx, xm
/* check if we have a homepage */
if (as_component_get_url (cpt, AS_URL_KIND_HOMEPAGE) == NULL) {
AsComponentKind ckind;
ckind = as_component_get_kind (cpt);

/* we require a homepage for anything but generic components and language packs */
if (ckind != AS_COMPONENT_KIND_GENERIC && ckind != AS_COMPONENT_KIND_LOCALIZATION)
Expand Down

0 comments on commit da31a93

Please sign in to comment.