mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-12 18:38:12 +00:00
[all] use explicit void parameter lists
This makes it a compile-time error to call a function that semantically takes no parameters with a nonzero number of arguments. Previously, such code would still compile, but risk blowing up the stack if a compiler chose to use something other than caller-cleanup calling conventions.
This commit is contained in:

committed by
Geoffrey McRae

parent
dc17492750
commit
a46a3a2668
@@ -210,7 +210,7 @@ bool option_register(struct Option options[])
|
||||
return true;
|
||||
};
|
||||
|
||||
void option_free()
|
||||
void option_free(void)
|
||||
{
|
||||
for(int i = 0; i < state.oCount; ++i)
|
||||
{
|
||||
@@ -520,7 +520,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
bool option_validate()
|
||||
bool option_validate(void)
|
||||
{
|
||||
if (state.doHelp)
|
||||
{
|
||||
@@ -571,7 +571,7 @@ bool option_validate()
|
||||
return ok;
|
||||
}
|
||||
|
||||
void option_print()
|
||||
void option_print(void)
|
||||
{
|
||||
printf(
|
||||
"The following is a complete list of options accepted by this application\n\n"
|
||||
|
Reference in New Issue
Block a user