Skip to content

Commit

Permalink
Merge pull request #285 from jeroen/strict-prototypes
Browse files Browse the repository at this point in the history
Fix -Wstrict-prototypes warnings
  • Loading branch information
phillmv authored Jan 31, 2023
2 parents b32a02f + ef5a494 commit 9d8ebd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ static void arena_free(void *ptr) {

cmark_mem CMARK_ARENA_MEM_ALLOCATOR = {arena_calloc, arena_realloc, arena_free};

cmark_mem *cmark_get_arena_mem_allocator() {
cmark_mem *cmark_get_arena_mem_allocator(void) {
return &CMARK_ARENA_MEM_ALLOCATOR;
}
4 changes: 2 additions & 2 deletions src/cmark-gfm.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ typedef struct cmark_mem {
* realloc and free.
*/
CMARK_GFM_EXPORT
cmark_mem *cmark_get_default_mem_allocator();
cmark_mem *cmark_get_default_mem_allocator(void);

/** An arena allocator; uses system calloc to allocate large
* slabs of memory. Memory in these slabs is not reused at all.
*/
CMARK_GFM_EXPORT
cmark_mem *cmark_get_arena_mem_allocator();
cmark_mem *cmark_get_arena_mem_allocator(void);

/** Resets the arena allocator, quickly returning all used memory
* to the operating system.
Expand Down
6 changes: 3 additions & 3 deletions src/cmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
cmark_node_type CMARK_NODE_LAST_BLOCK = CMARK_NODE_FOOTNOTE_DEFINITION;
cmark_node_type CMARK_NODE_LAST_INLINE = CMARK_NODE_FOOTNOTE_REFERENCE;

int cmark_version() { return CMARK_GFM_VERSION; }
int cmark_version(void) { return CMARK_GFM_VERSION; }

const char *cmark_version_string() { return CMARK_GFM_VERSION_STRING; }
const char *cmark_version_string(void) { return CMARK_GFM_VERSION_STRING; }

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

cmark_mem CMARK_DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, xfree};

cmark_mem *cmark_get_default_mem_allocator() {
cmark_mem *cmark_get_default_mem_allocator(void) {
return &CMARK_DEFAULT_MEM_ALLOCATOR;
}

Expand Down

0 comments on commit 9d8ebd6

Please sign in to comment.