Updated Compiler_Warnings patchset

Hoepfully fixes the macos compile error.
This commit is contained in:
Alistair Leslie-Hughes 2024-05-19 14:50:17 +10:00
parent 3ab6d734c0
commit 791a70faf0

View File

@ -0,0 +1,45 @@
From 53cc7a0c9e6d6abe983d7f9d70f83f36ccc1c0a5 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 19 May 2024 14:49:44 +1000
Subject: [PATCH] combase/tests: Avoid implicit cast of interface pointer.
---
dlls/combase/tests/string.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/combase/tests/string.c b/dlls/combase/tests/string.c
index ceb8ffa6e09..76863c2f4dd 100644
--- a/dlls/combase/tests/string.c
+++ b/dlls/combase/tests/string.c
@@ -509,7 +509,7 @@ static void test_hstring_struct(void)
ok(WindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string.\n");
- prv = CONTAINING_RECORD(str, struct hstring_private, header);
+ prv = CONTAINING_RECORD((void*)str, struct hstring_private, header);
ok(prv->header.flags == 0, "Expected 0 in flags field, got %#x.\n", prv->header.flags);
ok(prv->header.length == 6, "Expected 6 in length field, got %u.\n", prv->header.length);
@@ -520,7 +520,7 @@ static void test_hstring_struct(void)
ok(WindowsDuplicateString(str, &str2) == S_OK, "Failed to duplicate string.\n");
- prv2 = CONTAINING_RECORD(str2, struct hstring_private, header);
+ prv2 = CONTAINING_RECORD((void*)str2, struct hstring_private, header);
ok(prv->refcount == 2, "Expected 2 in refcount, got %lu.\n", prv->refcount);
ok(prv2->refcount == 2, "Expected 2 in refcount, got %lu.\n", prv2->refcount);
@@ -534,8 +534,8 @@ static void test_hstring_struct(void)
ok(WindowsCreateStringReference(input_string, 6, &hdr, &str) == S_OK, "Failed to create string ref.\n");
- prv = CONTAINING_RECORD(&hdr, struct hstring_private, header);
- prv2 = CONTAINING_RECORD(str, struct hstring_private, header);
+ prv = CONTAINING_RECORD((void*)&hdr, struct hstring_private, header);
+ prv2 = CONTAINING_RECORD((void*)str, struct hstring_private, header);
ok(prv == prv2, "Pointers not identical.\n");
ok(prv2->header.flags == 1, "Expected HSTRING_REFERENCE_FLAG to be set, got %#x.\n", prv2->header.flags);
--
2.43.0