[PATCH 01/10] Use void as "parameter" for functions without arguments.
Thorsten Wißmann
edu at thorsten-wissmann.de
Tue Feb 4 08:17:05 CET 2014
On Sat, Feb 01, 2014 at 09:55:14PM +0100, Simon Ruderich wrote:
> If nothing is specified, the function can take any number of arguments.
I know and I totally get your point and from the technical point of view
you are absolutely right, but ...
- I'm too lazy to continue writing void everywhere.
- It looks totally ugly...
- I don't see how ignoring that and writing ambigous fkt() causes any
issues regarding security or stability. One will notice it if
parameters to a function are ignored.
> // core functions
> -int quit() {
> +int quit(int argc, char* argv[]) {
> g_aboutToQuit = true;
> return 0;
> }
I really prefer the previous version, because in the other case there
are parameters of that function which aren't used. Same for reload,
true, false, etc.
Is there any advantage of writing (void), except that it is more
"conform"?
BTW I will look at the other patches later, I'd just like to reject
patches which should be rejected IMO as early as possible.
Cheers,
Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140204/4e4fe16c/attachment.sig>
More information about the hlwm
mailing list