Skip to content

Commit f3ee669

Browse files
committed
[libcxxabi] [test] Avoid mingw warnings about missing a return statement
With current versions of mingw-w64 headers, code following assert(false) isn't considered unreachable - thus add a dummy "return nullptr;", to avoid warnings (treated as errors) for a missing return statement. The root cause does get fixed further upstream in mingw-w64 in mingw-w64/mingw-w64@1690994 though. Differential Revision: https://reviews.llvm.org/D147860
1 parent 692518d commit f3ee669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
void dummy_ctor(void*) { assert(false && "should not be called"); }
1919
void dummy_dtor(void*) { assert(false && "should not be called"); }
2020

21-
void *dummy_alloc(size_t) { assert(false && "should not be called"); }
21+
void *dummy_alloc(size_t) { assert(false && "should not be called"); return nullptr; }
2222
void dummy_dealloc(void*) { assert(false && "should not be called"); }
2323
void dummy_dealloc_sized(void*, size_t) { assert(false && "should not be called"); }
2424

0 commit comments

Comments
 (0)