Skip to content

Commit 710aef2

Browse files
committed
Remove unnecessary void from definitions
The C templates had void in the parameter list of the definition of functions that take no arguments, but these functions already have a function prototype declared for them that has void in hte parameter list, making it unnecessary to also have in the definition.
1 parent 940b33a commit 710aef2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmake-init/templates/c/executable/source/lib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <lib.h>
22

3-
library create_library(void)
3+
library create_library()
44
{
55
library lib;
66
lib.name = "%(name)s";

cmake-init/templates/c/header/include/__name__/__name__.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern "C" {
1010
const char* header_only_name(void);
1111

1212
#ifdef %(uc_name)s_IMPLEMENTATION
13-
const char* header_only_name(void)
13+
const char* header_only_name()
1414
{
1515
return "%(name)s";
1616
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <%(name)s/%(name)s.h>
22

3-
const char* exported_function(void)
3+
const char* exported_function()
44
{
55
return "%(name)s";
66
}

0 commit comments

Comments
 (0)