Skip to content

Commit ef5a494

Browse files
committed
Fix -Wstrict-prototypes warnings
1 parent 9d57d8a commit ef5a494

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/arena.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ static void arena_free(void *ptr) {
9898

9999
cmark_mem CMARK_ARENA_MEM_ALLOCATOR = {arena_calloc, arena_realloc, arena_free};
100100

101-
cmark_mem *cmark_get_arena_mem_allocator() {
101+
cmark_mem *cmark_get_arena_mem_allocator(void) {
102102
return &CMARK_ARENA_MEM_ALLOCATOR;
103103
}

src/cmark-gfm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ typedef struct cmark_mem {
111111
* realloc and free.
112112
*/
113113
CMARK_GFM_EXPORT
114-
cmark_mem *cmark_get_default_mem_allocator();
114+
cmark_mem *cmark_get_default_mem_allocator(void);
115115

116116
/** An arena allocator; uses system calloc to allocate large
117117
* slabs of memory. Memory in these slabs is not reused at all.
118118
*/
119119
CMARK_GFM_EXPORT
120-
cmark_mem *cmark_get_arena_mem_allocator();
120+
cmark_mem *cmark_get_arena_mem_allocator(void);
121121

122122
/** Resets the arena allocator, quickly returning all used memory
123123
* to the operating system.

src/cmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
cmark_node_type CMARK_NODE_LAST_BLOCK = CMARK_NODE_FOOTNOTE_DEFINITION;
1111
cmark_node_type CMARK_NODE_LAST_INLINE = CMARK_NODE_FOOTNOTE_REFERENCE;
1212

13-
int cmark_version() { return CMARK_GFM_VERSION; }
13+
int cmark_version(void) { return CMARK_GFM_VERSION; }
1414

15-
const char *cmark_version_string() { return CMARK_GFM_VERSION_STRING; }
15+
const char *cmark_version_string(void) { return CMARK_GFM_VERSION_STRING; }
1616

1717
static void *xcalloc(size_t nmem, size_t size) {
1818
void *ptr = calloc(nmem, size);
@@ -38,7 +38,7 @@ static void xfree(void *ptr) {
3838

3939
cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, xfree};
4040

41-
cmark_mem *cmark_get_default_mem_allocator() {
41+
cmark_mem *cmark_get_default_mem_allocator(void) {
4242
return &CMARK_DEFAULT_MEM_ALLOCATOR;
4343
}
4444

0 commit comments

Comments
 (0)