Skip to content

Variable function parameters needs a better declaration... #81

@geneb

Description

@geneb

Lance brought to my attention a function declaration in op_ccall.c that goes like this:

u_int64 (*Fn0)();

Now ignoring the absolutely horrifying choice of variable name, he pointed out that the function pointer can be leveraged to call other functions and pass anywhere from none, to up to 50 parameters.

When we set the C standard to use at C17, this is no problem. However, C23 doesn't like that declaration AT ALL. The proposed fix is to make the declaration Fn0(...). GCC likes it and it seems to work, so....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions