Add -Wstrict-prototypes and fix offending functions
This commit is contained in:
parent
72549a214a
commit
9c8e834136
@ -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
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES profile)
|
||||
target_compile_options(${target} PRIVATE -pg)
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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, "
|
||||
|
Loading…
Reference in New Issue
Block a user