From: Noel Power Date: Fri, 3 May 2019 10:51:47 +0000 (+0100) Subject: s3/rpcclient: Fix bad (and illegal) func cast X-Git-Tag: tdb-1.4.1~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5733f678c8ef364f52ca6a144097ae2af275b0ec;p=thirdparty%2Fsamba.git s3/rpcclient: Fix bad (and illegal) func cast ../../source3/rpcclient/cmd_samr.c: In function ‘cmd_samr_get_usrdom_pwinfo’: ../../librpc/ndr/libndr.h:219:76: error: cast between incompatible function types from ‘void (*)(struct ndr_print *, const char *, uint32_t)’ {aka ‘void (*)(struct ndr_print *, const char *, unsigned int)’} to ‘void (*)(struct ndr_print *, const char *, const void *)’ [-Werror=cast-function-type] #define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p) ^ ../../source3/rpcclient/cmd_samr.c:2646:4: note: in expansion of macro ‘NDR_PRINT_STRUCT_STRING’ NDR_PRINT_STRUCT_STRING(mem_ctx, Signed-off-by: Noel Power Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Fri May 10 02:26:02 UTC 2019 on sn-devel-184 --- diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 898ae6ad6fc..7a3855b1b4c 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -2641,10 +2641,9 @@ static NTSTATUS cmd_samr_get_usrdom_pwinfo(struct rpc_pipe_client *cli, } status = result; if (NT_STATUS_IS_OK(result)) { - printf("min_password_length: %d\n", info.min_password_length); printf("%s\n", NDR_PRINT_STRUCT_STRING(mem_ctx, - samr_PasswordProperties, &info.password_properties)); + samr_PwInfo, &info)); } done: