From cf4ba8a4996e12e0a8ff08b575dc832fb0e9e1d2 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Tue, 7 Mar 2017 15:05:18 -0800 Subject: [PATCH] Resolve the missing-braces warnings for the Mac build Summary: This resolves most of the missing braces warnings triggered by the Mac build. Reviewed By: mofarrell Differential Revision: D4662882 fbshipit-source-id: 04a9e838970c7f93515b026e32822837a6eddf5b --- hphp/ppc64-asm/asm-ppc64.h | 84 ++++++++++++++++++------------------ hphp/runtime/base/memory-manager.cpp | 4 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/hphp/ppc64-asm/asm-ppc64.h b/hphp/ppc64-asm/asm-ppc64.h index 4721af6df00..a57d5fc2e7d 100644 --- a/hphp/ppc64-asm/asm-ppc64.h +++ b/hphp/ppc64-asm/asm-ppc64.h @@ -858,7 +858,7 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rt) < 32); - XO_form_t xo_formater { + XO_form_t xo_formater {{ rc, xop, oe, @@ -866,7 +866,7 @@ protected: static_cast(ra), static_cast(rt), op - }; + }}; dword(xo_formater.instruction); } @@ -880,12 +880,12 @@ protected: assert(static_cast(rt) < 32); assert(static_cast(ra) < 32); - D_form_t d_formater { + D_form_t d_formater {{ static_cast(imm), static_cast(ra), static_cast(rt), op - }; + }}; dword(d_formater.instruction); } @@ -895,12 +895,12 @@ protected: const bool aa = 0, const bool lk = 0) { - I_form_t i_formater { + I_form_t i_formater {{ lk, aa, imm >> 2, op - }; + }}; dword(i_formater.instruction); } @@ -911,25 +911,25 @@ protected: const uint32_t bd, const bool aa = 0, const bool lk = 0) { - B_form_t b_formater { + B_form_t b_formater {{ lk, aa, bd >> 2, bi, bo, op - }; + }}; dword(b_formater.instruction); } void EmitSCForm(const uint8_t op, const uint16_t lev) { - SC_form_t sc_formater { + SC_form_t sc_formater {{ 1, lev, op - }; + }}; dword(sc_formater.instruction); } @@ -946,14 +946,14 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rt) < 32); - X_form_t x_formater { + X_form_t x_formater {{ rc, xop, static_cast(rb), static_cast(ra), static_cast(rt), op - }; + }}; dword(x_formater.instruction); } @@ -965,14 +965,14 @@ protected: const uint16_t xop, const bool rc = 0){ - X_form_t x_formater { + X_form_t x_formater {{ rc, xop, static_cast(rb), static_cast(ra), static_cast(rt), op - }; + }}; dword(x_formater.instruction); } @@ -989,13 +989,13 @@ protected: assert(static_cast(rt) < 32); assert(static_cast(imm << 14) == 0); - DS_form_t ds_formater { + DS_form_t ds_formater {{ xop, static_cast(imm) >> 2, static_cast(ra), static_cast(rt), op - }; + }}; dword(ds_formater.instruction); } @@ -1009,13 +1009,13 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(imm << 12) == 0); - DQ_form_t dq_formater { + DQ_form_t dq_formater {{ 0x0, //Reserved static_cast(rtp), static_cast(ra), static_cast(imm) >> 4, op - }; + }}; dword(dq_formater.instruction); } @@ -1028,14 +1028,14 @@ protected: const uint16_t xop, const bool lk = 0) { - XL_form_t xl_formater { + XL_form_t xl_formater {{ lk, xop, bb, ba, bt, op - }; + }}; dword(xl_formater.instruction); } @@ -1054,7 +1054,7 @@ protected: assert(static_cast(rb) < 32); assert(static_cast(bc) < 32); - A_form_t a_formater { + A_form_t a_formater {{ rc, xop, static_cast(bc), @@ -1062,7 +1062,7 @@ protected: static_cast(ra), static_cast(rt), op - }; + }}; dword(a_formater.instruction); } @@ -1080,7 +1080,7 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rb) < 32); - M_form_t m_formater { + M_form_t m_formater {{ rc, me, mb, @@ -1088,7 +1088,7 @@ protected: static_cast(ra), static_cast(rs), op - }; + }}; dword(m_formater.instruction); } @@ -1105,7 +1105,7 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rs) < 32); - MD_form_t md_formater { + MD_form_t md_formater {{ rc, static_cast(sh >> 5), // sh5 xop, @@ -1114,7 +1114,7 @@ protected: static_cast(ra), static_cast(rs), op - }; + }}; dword(md_formater.instruction); } @@ -1132,7 +1132,7 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rs) < 32); - MDS_form_t mds_formater { + MDS_form_t mds_formater {{ rc, xop, mb, @@ -1140,7 +1140,7 @@ protected: static_cast(ra), static_cast(rs), op - }; + }}; dword(mds_formater.instruction); } @@ -1154,14 +1154,14 @@ protected: // GP Register cannot be greater than 31 assert(static_cast(rs) < 32); - XFX_form_t xfx_formater { + XFX_form_t xfx_formater {{ rsv, xo, (static_cast(spr) >> 5) & 0x1F, static_cast(spr) & 0x1F, static_cast(rs), op - }; + }}; dword(xfx_formater.instruction); } @@ -1174,14 +1174,14 @@ protected: // GP Register cannot be greater than 31 assert(static_cast(rs) < 32); - XFX_form_t xfx_formater { + XFX_form_t xfx_formater {{ rsv, xo, static_cast((mask) & 0x1f), static_cast(((mask) >> 5) & 0x1F), static_cast(rs), op - }; + }}; dword(xfx_formater.instruction); } @@ -1193,7 +1193,7 @@ protected: const uint16_t xo, const bool bx, const bool tx) { - XX2_form_t xx2_formater { + XX2_form_t xx2_formater {{ tx, bx, xo, @@ -1201,7 +1201,7 @@ protected: static_cast(uim & 0x3), static_cast(t), op - }; + }}; dword(xx2_formater.instruction); } @@ -1213,7 +1213,7 @@ protected: const bool ax, const bool bx, const bool tx) { - XX3_form_t xx3_formater { + XX3_form_t xx3_formater {{ tx, bx, ax, @@ -1222,7 +1222,7 @@ protected: static_cast(a), static_cast(t), op - }; + }}; dword(xx3_formater.instruction); } @@ -1238,14 +1238,14 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rb) < 32); - XX1_form_t xx1_formater { + XX1_form_t xx1_formater {{ tx, xo, static_cast(rb), static_cast(ra), static_cast(s), op - }; + }}; dword(xx1_formater.instruction); } @@ -1260,13 +1260,13 @@ protected: assert(static_cast(ra) < 32); assert(static_cast(rb) < 32); - VX_form_t vx_formater { + VX_form_t vx_formater {{ xo, static_cast(rb), static_cast(ra), static_cast(rt), op - }; + }}; dword(vx_formater.instruction); } @@ -1282,7 +1282,7 @@ protected: assert(static_cast(rt) < 32); assert(static_cast(ra) < 32); - XS_form_t xs_formater { + XS_form_t xs_formater {{ rc, static_cast(sh >> 5), xop, @@ -1290,7 +1290,7 @@ protected: static_cast(ra), static_cast(rt), op - }; + }}; dword(xs_formater.instruction); } diff --git a/hphp/runtime/base/memory-manager.cpp b/hphp/runtime/base/memory-manager.cpp index ac9c8fb967c..ed40fec37e1 100644 --- a/hphp/runtime/base/memory-manager.cpp +++ b/hphp/runtime/base/memory-manager.cpp @@ -548,7 +548,7 @@ void MemoryManager::flush() { * case c and combine the lists eventually. */ -const std::array header_names = { +const std::array header_names = {{ "PackedArray", "MixedArray", "EmptyArray", "ApcArray", "GlobalsArray", "ProxyArray", "DictArray", "VecArray", "KeysetArray", "String", "Resource", "Ref", @@ -557,7 +557,7 @@ const std::array header_names = { "AsyncFuncFrame", "NativeData", "ClosureHdr", "SmallMalloc", "BigMalloc", "BigObj", "Free", "Hole" -}; +}}; // initialize a Hole header in the unused memory between m_front and m_limit void MemoryManager::initHole(void* ptr, uint32_t size) { -- 2.11.4.GIT