From: Eric Date: Sat, 16 Mar 2019 01:57:52 +0000 (-0700) Subject: [flang] more compiler warnings X-Git-Tag: llvmorg-12-init~9537^2~1602 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b09d21b132f20669b69f2011514416894ef297f;p=platform%2Fupstream%2Fllvm.git [flang] more compiler warnings Original-commit: flang-compiler/f18@df8c83c106ee5f8ab7c66f5ad6a87bf8571860bf Reviewed-on: https://github.com/flang-compiler/f18/pull/334 --- diff --git a/flang/lib/FIR/afforestation.cc b/flang/lib/FIR/afforestation.cc index c253285..3be8f7e 100644 --- a/flang/lib/FIR/afforestation.cc +++ b/flang/lib/FIR/afforestation.cc @@ -1270,7 +1270,7 @@ public: return builder_->CreateExpr(ExprRef(x.thing)); } SwitchArguments ComposeSwitchArgs(const LinearSwitch &op) { - SwitchArguments result{{NOTHING, unspecifiedLabel, {}, op.refs}}; + SwitchArguments result{NOTHING, unspecifiedLabel, {}, op.refs}; std::visit( common::visitors{ [&](const parser::ComputedGotoStmt *c) { @@ -1297,8 +1297,8 @@ public: auto &cases{ std::get>(caseConstruct->t)}; SwitchCaseArguments result{ - {GetSwitchCaseSelector(caseConstruct), unspecifiedLabel, - populateSwitchValues(builder_, cases), std::move(refs)}}; + GetSwitchCaseSelector(caseConstruct), unspecifiedLabel, + populateSwitchValues(builder_, cases), std::move(refs)}; cleanupSwitchPairs( result.defLab, result.values, result.labels); return result; @@ -1308,8 +1308,8 @@ public: const std::vector &refs) { auto &ranks{std::get>( selectRankConstruct->t)}; - SwitchRankArguments result{{GetSwitchRankSelector(selectRankConstruct), - unspecifiedLabel, populateSwitchValues(ranks), std::move(refs)}}; + SwitchRankArguments result{GetSwitchRankSelector(selectRankConstruct), + unspecifiedLabel, populateSwitchValues(ranks), std::move(refs)}; if (auto &name{GetSwitchAssociateName( selectRankConstruct)}) { (void)name; // get rid of warning @@ -1324,8 +1324,8 @@ public: const std::vector &refs) { auto &types{std::get>( selectTypeConstruct->t)}; - SwitchTypeArguments result{{GetSwitchTypeSelector(selectTypeConstruct), - unspecifiedLabel, populateSwitchValues(types), std::move(refs)}}; + SwitchTypeArguments result{GetSwitchTypeSelector(selectTypeConstruct), + unspecifiedLabel, populateSwitchValues(types), std::move(refs)}; if (auto &name{GetSwitchAssociateName( selectTypeConstruct)}) { (void)name; // get rid of warning