Skip to content

Commit

Permalink
Add void to C function definitions as well
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlyanon committed Dec 22, 2023
1 parent 23681e4 commit d02d99b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake-init/templates/c/executable/source/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

static char const json[] = "{\"name\":\"{= name =}\"}";{% end %}

struct library create_library()
struct library create_library(void)
{
struct library lib = {% if pm %}{NULL};{% if not c99 %}
struct json_tokener* tokener = NULL;
Expand Down
2 changes: 1 addition & 1 deletion cmake-init/templates/c/header/include/__name__/__name__.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ char const* header_only_name(void);
{% if pm %}
static char const json[] = "{\"name\":\"{= name =}\"}";
{% end %}
char const* header_only_name()
char const* header_only_name(void)
{{% if pm %}{% if not c99 %}
struct json_tokener* tokener = NULL;
struct json_object* object = NULL;
Expand Down
2 changes: 1 addition & 1 deletion cmake-init/templates/c/shared/source/__name__.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

static char const json[] = "{\"name\":\"{= name =}\"}";{% end %}

char const* exported_function()
char const* exported_function(void)
{{% if pm %}{% if not c99 %}
struct json_tokener* tokener = NULL;
struct json_object* object = NULL;
Expand Down

0 comments on commit d02d99b

Please sign in to comment.