silentbicycle / theft

property-based testing for C: generate input to find obscure bugs, then reduce to minimal failing input
ISC License
610 stars 31 forks source link

test: use c prototypes & avoid old-style function defs #50

Closed codyps closed 5 years ago

codyps commented 5 years ago

When void is omitted from functions that take no parameters in C, the functions are both not prototypes (which -Wstrict-prototypes complains about) and old-style-definitions (which -Wold-style-definition complains about). They also are considered to take any number/kind of parameters.

Add void to clean these up.

silentbicycle commented 5 years ago

Thanks. I haven't built this codebase with -Wstrict-prototypes, it doesn't surprise me there are a couple old test functions without void like that.

As with #47, I'd rather merge this to develop rather than master. I'm going to merge it via cherry-pick. I'll mention it in the notes for the next release.

Incidentally, I (ab)used functions with unspecified parameters in my IOCCC entry last year. :)

silentbicycle commented 5 years ago

Merged via cherry-pick.