...
- an ambiguous functional interface between the caller and callee
- sensitive information outflow
A similar rule recommendation deals with parameter type in a more general sense: DCL07-C. Include the appropriate type information in function declarators.
...
In C++, foo()
and foo(void)
have exactly the same meaning and effect, so this rule doesn't apply to C++. However, foo(void)
should be declared explicitly instead of foo()
to distinguish it from foo(...)
, which accepts an arbitrary number and type of arguments.
Bibliography
unmigrated-wiki-markup
\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] Forward and Section 6.9.1, "Function definitions"
Bibliography
Wiki Markup |
---|
\[[C void usage|http://tigcc.ticalc.org/doc/keywords.html#voidhml#void]\] |
...
DCL19-C. Use as minimal a scope as possible for all variables and functions 02. Declarations and Initialization (DCL)