s3/rpcclient: Fix bad (and illegal) func cast
authorNoel Power <noel.power@suse.com>
Fri, 3 May 2019 10:51:47 +0000 (11:51 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 May 2019 02:26:02 +0000 (02:26 +0000)
../../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 <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 10 02:26:02 UTC 2019 on sn-devel-184

source3/rpcclient/cmd_samr.c

index 898ae6a..7a3855b 100644 (file)
@@ -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: