Fixed wrongly thrown exception in case a function is declared like void foo(void) but called foo().