diff options
author | whitequark <whitequark@whitequark.org> | 2020-06-10 15:57:01 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2020-06-10 15:57:07 +0000 |
commit | cde99e696a5d1506cbd86732eeb41fd9f1774405 (patch) | |
tree | e490a19c0efedc66d625ad8dd62d245a15d1b485 /backends/cxxrtl/cxxrtl.h | |
parent | 574f5cb5b2073a301c320e186ef539b655f9ac0b (diff) | |
download | yosys-cde99e696a5d1506cbd86732eeb41fd9f1774405.tar.gz yosys-cde99e696a5d1506cbd86732eeb41fd9f1774405.tar.bz2 yosys-cde99e696a5d1506cbd86732eeb41fd9f1774405.zip |
cxxrtl: fix a few gcc warnings.
Diffstat (limited to 'backends/cxxrtl/cxxrtl.h')
-rw-r--r-- | backends/cxxrtl/cxxrtl.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/backends/cxxrtl/cxxrtl.h b/backends/cxxrtl/cxxrtl.h index c988c9e80..c6dc0e892 100644 --- a/backends/cxxrtl/cxxrtl.h +++ b/backends/cxxrtl/cxxrtl.h @@ -608,6 +608,7 @@ struct memory { // This utterly reprehensible construct is the most reasonable way to apply a function to every element // of a parameter pack, if the elements all have different types and so cannot be cast to an initializer list. auto _ = {std::move(std::begin(init.data), std::end(init.data), data.begin() + init.offset)...}; + (void)_; } // An operator for direct memory reads. May be used at any time during the simulation. @@ -676,10 +677,8 @@ struct metadata { // In debug mode, using the wrong .as_*() function will assert. // In release mode, using the wrong .as_*() function will safely return a default value. - union { - const unsigned uint_value = 0; - const signed sint_value; - }; + const unsigned uint_value = 0; + const signed sint_value = 0; const std::string string_value = ""; const double double_value = 0.0; @@ -799,7 +798,9 @@ struct module { return deltas; } - virtual void debug_info(debug_items &items, std::string path = "") {} + virtual void debug_info(debug_items &items, std::string path = "") { + (void)items, (void)path; + } }; } // namespace cxxrtl |