[PATCH 5/5] wined3d: Avoid a compiler warning in context_stream_info_from_declaration().

Henri Verbeet hverbeet at codeweavers.com
Tue Jul 22 01:44:24 CDT 2014


Specifically, "cast to pointer from integer of different size" on 64-bit
builds. I considered making "addr" a ULONG_PTR instead, but in the end that
just introduces (void *) casts everywhere, since that's what most GL calls
need.
---
 dlls/wined3d/context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 622cca1..70b9b31 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2794,7 +2794,7 @@ void context_stream_info_from_declaration(struct wined3d_context *context,
 
             stream_info->elements[idx].format = element->format;
             stream_info->elements[idx].data.buffer_object = 0;
-            stream_info->elements[idx].data.addr = (BYTE *)stream->offset + element->offset;
+            stream_info->elements[idx].data.addr = (BYTE *)NULL + stream->offset + element->offset;
             stream_info->elements[idx].stride = stream->stride;
             stream_info->elements[idx].stream_idx = element->input_slot;
 
-- 
1.7.10.4




More information about the wine-patches mailing list