From: Jos Collin Date: Fri, 23 Jun 2017 14:57:55 +0000 (+0530) Subject: rgw: initialize non-static class members in ESQueryCompiler X-Git-Tag: v12.1.2~1^2~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15884%2Fhead;p=ceph.git rgw: initialize non-static class members in ESQueryCompiler Fixes the Coverity Scan Report: CID 1412617 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 3. uninit_member: Non-static class member field_aliases is not initialized in this constructor nor in any functions that it calls. 5. uninit_member: Non-static class member restricted_fields is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Jos Collin --- diff --git a/src/rgw/rgw_es_query.h b/src/rgw/rgw_es_query.h index 4375d93251c..1341e4443a9 100644 --- a/src/rgw/rgw_es_query.h +++ b/src/rgw/rgw_es_query.h @@ -102,8 +102,8 @@ class ESQueryCompiler { ESEntityTypeMap *generic_type_map{nullptr}; ESEntityTypeMap *custom_type_map{nullptr}; - map *field_aliases; - set *restricted_fields; + map *field_aliases = nullptr; + set *restricted_fields = nullptr; public: ESQueryCompiler(const string& query, list > *prepend_eq_conds, const string& _custom_prefix) : parser(query), custom_prefix(_custom_prefix) {