diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e7501..0ec1c1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,9 @@ function(cmark_add_compile_options target) endif() target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS) else() - target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic) + target_compile_options(${target} PRIVATE + -Wall -Wextra -pedantic + $<$:-Wstrict-prototypes>) endif() if(CMAKE_BUILD_TYPE MATCHES profile) target_compile_options(${target} PRIVATE -pg) diff --git a/api_test/harness.c b/api_test/harness.c index f6fd0bc..d27e7ca 100644 --- a/api_test/harness.c +++ b/api_test/harness.c @@ -5,7 +5,7 @@ #include "harness.h" -test_batch_runner *test_batch_runner_new() { +test_batch_runner *test_batch_runner_new(void) { return (test_batch_runner *)calloc(1, sizeof(test_batch_runner)); } diff --git a/api_test/harness.h b/api_test/harness.h index 53b9889..f352f07 100644 --- a/api_test/harness.h +++ b/api_test/harness.h @@ -12,7 +12,7 @@ typedef struct { int num_skipped; } test_batch_runner; -test_batch_runner *test_batch_runner_new(); +test_batch_runner *test_batch_runner_new(void); void SKIP(test_batch_runner *runner, int num_tests); diff --git a/api_test/main.c b/api_test/main.c index 6d11e3d..c2db737 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -1067,7 +1067,7 @@ static void ref_source_pos(test_batch_runner *runner) { cmark_node_free(doc); } -int main() { +int main(void) { int retval; test_batch_runner *runner = test_batch_runner_new(); diff --git a/src/main.c b/src/main.c index 0cc2b3d..e02a3c4 100644 --- a/src/main.c +++ b/src/main.c @@ -28,7 +28,7 @@ typedef enum { FORMAT_LATEX } writer_format; -void print_usage() { +void print_usage(void) { printf("Usage: cmark [FILE*]\n"); printf("Options:\n"); printf(" --to, -t FORMAT Specify output format (html, xml, man, "