From: Mark Wielaard Date: Thu, 18 Apr 2019 14:24:15 +0000 (+0200) Subject: Fix an undefined behaviour in has_var_type_cv_qual_change X-Git-Tag: libabigail-1.7~115 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=1c358a50229a74edbeeb8b799e9ec8f3409826c4;p=libabigail.git Fix an undefined behaviour in has_var_type_cv_qual_change * src/abg-comp-filter.cc: (has_var_type_cv_qual_change): Initialize the ch_kind variable before using it. Signed-off-by: Dodji Seketeli --- diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc index 9a278a38..1a1eb0d2 100644 --- a/src/abg-comp-filter.cc +++ b/src/abg-comp-filter.cc @@ -1197,7 +1197,7 @@ has_var_type_cv_qual_change(const diff* dif) { // Make sure the variable diff does carry a type change at least - change_kind ch_kind; + change_kind ch_kind = NO_CHANGE_KIND; if (equals(*var_dif->first_var(), *var_dif->second_var(), &ch_kind)) return false;