forked from wine-compholio/wine-staging
-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
patches/Compiler_Warnings/0020-combase-tests-Avoid-implicit-cast-of-interface-point.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|