]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libads: fix compiler warning in trust_pw_change()
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Nov 2024 18:13:55 +0000 (19:13 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 5 Dec 2024 16:46:37 +0000 (16:46 +0000)
../../source3/libads/trusts_util.c: In function ‘trust_pw_change’:
../../source3/libads/trusts_util.c:302:45: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]
  302 |                                    (void **)&new_trust_pw_blob.data,

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libads/trusts_util.c

index 6f805f2365e4da8bb5b5984e1aa3e72cf01071a1..b00ab8859575fd68a8eb8c4d53c90d37b84e37c6 100644 (file)
@@ -299,7 +299,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context,
        len = strlen(new_trust_pw_str);
        ok = convert_string_talloc(frame, CH_UNIX, CH_UTF16,
                                   new_trust_pw_str, len,
-                                  (void **)&new_trust_pw_blob.data,
+                                  &new_trust_pw_blob.data,
                                   &new_trust_pw_blob.length);
        if (!ok) {
                status = NT_STATUS_UNMAPPABLE_CHARACTER;