wined3d: Cast-qual warnings fix (3 of 3)
Andrew Talbot
Andrew.Talbot at talbotville.com
Fri Nov 24 08:15:16 CST 2006
Changelog:
wined3d: Cast-qual warnings fix.
diff -urN a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
--- a/dlls/wined3d/pixelshader.c 2006-10-20 18:08:05.000000000 +0100
+++ b/dlls/wined3d/pixelshader.c 2006-11-24 13:10:29.000000000 +0000
@@ -938,9 +938,12 @@
TRACE("(%p) : Copying the function\n", This);
if (NULL != pFunction) {
- This->baseShader.function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
- if (!This->baseShader.function) return E_OUTOFMEMORY;
- memcpy((void *)This->baseShader.function, pFunction, This->baseShader.functionLength);
+ void *function;
+
+ function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
+ if (!function) return E_OUTOFMEMORY;
+ memcpy(function, pFunction, This->baseShader.functionLength);
+ This->baseShader.function = function;
} else {
This->baseShader.function = NULL;
}
diff -urN a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
--- a/dlls/wined3d/vertexshader.c 2006-11-07 17:36:36.000000000 +0000
+++ b/dlls/wined3d/vertexshader.c 2006-11-24 13:17:28.000000000 +0000
@@ -1214,9 +1214,12 @@
/* copy the function ... because it will certainly be released by application */
if (NULL != pFunction) {
- This->baseShader.function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
- if (!This->baseShader.function) return E_OUTOFMEMORY;
- memcpy((void *)This->baseShader.function, pFunction, This->baseShader.functionLength);
+ void *function;
+
+ function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
+ if (!function) return E_OUTOFMEMORY;
+ memcpy(function, pFunction, This->baseShader.functionLength);
+ This->baseShader.function = function;
} else {
This->baseShader.function = NULL;
}
More information about the wine-patches
mailing list