Fix strict function prototype warnings
Fix warning ``warning: function declaration isn’t a prototype`` when building mimalloc with ``-Wstrict-prototypes`` flag. In C argumentless functions should be declared as ``func(void)``. Reproducer: ```shell $ cmake ../.. -DCMAKE_C_FLAGS="-Wstrict-prototypes" $ make VERBOSE=1 ``` Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Neil Schemenauer <nas@arctrix.com> Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
@@ -64,15 +64,15 @@ static int failed = 0;
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test functions
|
||||
// ---------------------------------------------------------------------------
|
||||
bool test_heap1();
|
||||
bool test_heap2();
|
||||
bool test_stl_allocator1();
|
||||
bool test_stl_allocator2();
|
||||
bool test_heap1(void);
|
||||
bool test_heap2(void);
|
||||
bool test_stl_allocator1(void);
|
||||
bool test_stl_allocator2(void);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Main testing
|
||||
// ---------------------------------------------------------------------------
|
||||
int main() {
|
||||
int main(void) {
|
||||
mi_option_disable(mi_option_verbose);
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user