From fb0af5d9adae3ce751fc680d7bf47b53f94c207e Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Mon, 25 Apr 2022 14:17:02 +0100 Subject: [PATCH] winemac: Use ULongToPtr() to cast format ids to void ptrs. This avoids compiler warnings on 64-bit. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/clipboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index 70b087846e9..63c8bc76e75 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1514,7 +1514,7 @@ static WINE_CLIPFORMAT** get_formats_for_pasteboard_types(CFArrayRef types, UINT if (!format->synthesized) { TRACE("for type %s got format %p/%s\n", debugstr_cf(type), format, debugstr_format(format->format_id)); - CFSetAddValue(seen_formats, (void*)format->format_id); + CFSetAddValue(seen_formats, ULongToPtr(format->format_id)); formats[pos++] = format; } else if (format->natural_format && @@ -1523,7 +1523,7 @@ static WINE_CLIPFORMAT** get_formats_for_pasteboard_types(CFArrayRef types, UINT TRACE("for type %s deferring synthesized formats because type %s is also present\n", debugstr_cf(type), debugstr_cf(format->natural_format->type)); } - else if (CFSetContainsValue(seen_formats, (void*)format->format_id)) + else if (CFSetContainsValue(seen_formats, ULongToPtr(format->format_id))) { TRACE("for type %s got duplicate synthesized format %p/%s; skipping\n", debugstr_cf(type), format, debugstr_format(format->format_id)); @@ -1531,7 +1531,7 @@ static WINE_CLIPFORMAT** get_formats_for_pasteboard_types(CFArrayRef types, UINT else { TRACE("for type %s got synthesized format %p/%s\n", debugstr_cf(type), format, debugstr_format(format->format_id)); - CFSetAddValue(seen_formats, (void*)format->format_id); + CFSetAddValue(seen_formats, ULongToPtr(format->format_id)); formats[pos++] = format; } } @@ -1546,10 +1546,10 @@ static WINE_CLIPFORMAT** get_formats_for_pasteboard_types(CFArrayRef types, UINT if (!format->synthesized) continue; /* Don't duplicate a real value with a synthesized value. */ - if (CFSetContainsValue(seen_formats, (void*)format->format_id)) continue; + if (CFSetContainsValue(seen_formats, ULongToPtr(format->format_id))) continue; TRACE("for type %s got synthesized format %p/%s\n", debugstr_cf(type), format, debugstr_format(format->format_id)); - CFSetAddValue(seen_formats, (void*)format->format_id); + CFSetAddValue(seen_formats, ULongToPtr(format->format_id)); formats[pos++] = format; }