Re: [hackers] [sbase] [PATCH] test: Use complete prototypes in func field of struct test

From: Laslo Hunhold <dev_AT_frign.de>
Date: Fri, 24 Mar 2017 10:45:05 +0100

On Tue, 7 Mar 2017 23:32:44 -0800
Michael Forney <mforney_AT_mforney.org> wrote:

Hey Michael,

> Function declarators with empty parentheses is an obsolescent feature
> in C99, and it is not clear to me that the standard allows assigning
> assigning a function pointer declared in this way to a function
> declared in prototype-format.
>
> In any case, using a union for the functions is just as simple and
> enforces that we pass the correct types to the functions.

your patch is pretty elegant, because it allows the compiler to compare
the function's declaration to its definition, ensuring correct calls.

I've pushed it.

Cheers

Laslo

-- 
Laslo Hunhold <dev_AT_frign.de>
Received on Fri Mar 24 2017 - 10:45:05 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 24 2017 - 10:48:29 CET