From d8998f5d9b01a2fcc3eefba7679a668518fa6657 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 5 Oct 2019 00:37:55 +1000 Subject: (nw) fix std::array initialisation with GCC5 in nlwav.cpp, stop suppressing -Wterminate now that asserts are really asserts --- scripts/genie.lua | 6 ------ src/lib/netlist/prg/nlwav.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/genie.lua b/scripts/genie.lua index fe5b8930f3f..d90b98adf49 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1520,12 +1520,6 @@ configuration { "vsllvm" } } --- adding this till we sort out asserts in debug mode -configuration { "Debug", "gmake" } - buildoptions_cpp { - "-Wno-terminate", - } - configuration { } if (_OPTIONS["SOURCES"] ~= nil) then diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp index db55290d618..5ebd2ce01fb 100644 --- a/src/lib/netlist/prg/nlwav.cpp +++ b/src/lib/netlist/prg/nlwav.cpp @@ -75,9 +75,9 @@ public: private: struct riff_chunk_t { - std::array group_id = {'R','I','F','F'}; + std::array group_id = {{'R','I','F','F'}}; uint32_t filelen = 0; - std::array rifftype = {'W','A','V','E'}; + std::array rifftype = {{'W','A','V','E'}}; }; struct riff_format_t @@ -89,7 +89,7 @@ private: block_align = channels * ((bits_sample + 7) / 8); bytes_per_second = sample_rate * block_align; } - std::array signature = {'f','m','t',' '}; + std::array signature = {{'f','m','t',' '}}; uint32_t fmt_length = 16; uint16_t format_tag = 0x0001; // PCM uint16_t channels; @@ -102,7 +102,7 @@ private: struct riff_data_t { riff_data_t(uint32_t alen) : len(alen) {} - std::array signature = {'d','a','t','a'}; + std::array signature = {{'d','a','t','a'}}; uint32_t len; // data follows }; -- cgit v1.2.3