diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-03-03 23:32:07 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-03-03 23:32:07 +0800 |
commit | 4f529660c1f725186a6bfe680557f98b066cf709 (patch) | |
tree | 065bd94e8e08100b9f991ddbcdc9c97a5fd587f1 /src/trans/codegen_c.cpp | |
parent | 4fd34c0410ee16cda693e9f1e7b9a6e5a7a0b0aa (diff) | |
download | mrust-4f529660c1f725186a6bfe680557f98b066cf709.tar.gz |
Codegen C - Avoid warning from msvc change
Diffstat (limited to 'src/trans/codegen_c.cpp')
-rw-r--r-- | src/trans/codegen_c.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index 5c180fe7..c7750209 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -485,7 +485,7 @@ namespace { << "static inline TRAITOBJ_PTR make_traitobjptr(void* ptr, void* vt) { TRAITOBJ_PTR rv = { ptr, vt }; return rv; }\n" << "\n" << "static inline size_t mrustc_max(size_t a, size_t b) { return a < b ? b : a; }\n" - << "static inline tUNIT noop_drop(tUNIT *p) { tUNIT v = {0}; return v; }\n" + << "static inline tUNIT noop_drop(tUNIT *p) { tUNIT v = {" << (m_options.disallow_empty_structs ? "0" : "") << "}; return v; }\n" << "\n" // A linear (fast-fail) search of a list of strings << "static inline size_t mrustc_string_search_linear(SLICE_PTR val, size_t count, SLICE_PTR* options) {\n" |