From: Ben Woodard Date: Thu, 11 May 2017 23:30:20 +0000 (-0700) Subject: Fix more clang build warnings X-Git-Tag: upstream/1.0~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3011d2ac8da21e2f7cba868ba43963e60c22f283;p=platform%2Fupstream%2Flibabigail.git Fix more clang build warnings * include/abg-ini.h (config::section::priv): Make this be a class, not a struct. * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir) (build_ir_node_from_die): Add parenthesis around assignment expressions inside conditional expression. * src/abg-suppression.cc (read_function_suppression): Likewise. Signed-off-by: Dodji Seketeli --- diff --git a/include/abg-ini.h b/include/abg-ini.h index bd4ed520..3c7faba3 100644 --- a/include/abg-ini.h +++ b/include/abg-ini.h @@ -392,7 +392,7 @@ public: /// The abstraction of one section of the .ini config. class config::section { - struct priv; + class priv; typedef shared_ptr priv_sptr; priv_sptr priv_; diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index c8c21e09..ba692950 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -10294,7 +10294,7 @@ build_translation_unit_and_add_to_ir(read_context& ctxt, // variable definition from its current non-class // scope ... decl_base_sptr d; - if (d = lookup_var_decl_in_scope(mem_name, class_type)) + if ((d = lookup_var_decl_in_scope(mem_name, class_type))) // This is the data member with the same name in cl. // We just need to flag it as static. ; @@ -12933,8 +12933,8 @@ build_ir_node_from_die(read_context& ctxt, die_source source_of_die; assert(ctxt.get_die_source(die, source_of_die)); - if (result = ctxt.lookup_decl_from_die_offset(dwarf_dieoffset(die), - source_of_die)) + if ((result = ctxt.lookup_decl_from_die_offset(dwarf_dieoffset(die), + source_of_die))) return result; switch (tag) diff --git a/src/abg-suppression.cc b/src/abg-suppression.cc index 8d25f659..8bb6a610 100644 --- a/src/abg-suppression.cc +++ b/src/abg-suppression.cc @@ -3039,8 +3039,8 @@ read_function_suppression(const ini::config::section& section) { ini::simple_property_sptr prop = is_simple_property(*p); assert(prop); - if (parm = read_parameter_spec_from_string - (prop->get_value()->as_string())) + if ((parm = read_parameter_spec_from_string + (prop->get_value()->as_string()))) parms.push_back(parm); }