This produces the following warnings/errors and found the bug
fixed in the previous commit:
librpc/gen_ndr/ndr_misc.c:851:15: error: cast between incompatible function types
from ‘enum ndr_err_code (*)(struct ndr_push *, int, enum netr_SchannelType)’ to
‘enum ndr_err_code (*)(struct ndr_push *, int, const void *)’ [-Werror=cast-function-type]
.ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SchannelType,
Signed-off-by: Stefan Metzmacher <metze@samba.org>
# we add these here to ensure that -Wstrict-prototypes is not set during configure
conf.ADD_CFLAGS('-Werror=strict-prototypes -Wstrict-prototypes',
testflags=True)
+ conf.ADD_CFLAGS('-Werror=cast-function-type -Wcast-function-type',
+ testflags=True)
conf.ADD_CFLAGS('-Werror=write-strings -Wwrite-strings',
testflags=True)
conf.ADD_CFLAGS('-Werror-implicit-function-declaration',