Rob Shearman : d3dx8: Initialise temp in D3DXQuaternionInverse to avoid a uninitialised variable warning with some versions of gcc .

Alexandre Julliard julliard at winehq.org
Mon Dec 3 09:17:45 CST 2007


Module: wine
Branch: master
Commit: a4450f0af9acb3fcdfd4b5eb306729ea42d787e3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a4450f0af9acb3fcdfd4b5eb306729ea42d787e3

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Nov 30 18:03:56 2007 +0000

d3dx8: Initialise temp in D3DXQuaternionInverse to avoid a uninitialised variable warning with some versions of gcc.

---

 dlls/d3dx8/math.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dx8/math.c b/dlls/d3dx8/math.c
index 55da2d9..18115b4 100644
--- a/dlls/d3dx8/math.c
+++ b/dlls/d3dx8/math.c
@@ -695,6 +695,11 @@ D3DXQUATERNION* WINAPI D3DXQuaternionInverse(D3DXQUATERNION *pout, CONST D3DXQUA
     D3DXQUATERNION temp;
     FLOAT norm;
 
+    temp.x = 0.0f;
+    temp.y = 0.0f;
+    temp.z = 0.0f;
+    temp.w = 0.0f;
+
     norm = D3DXQuaternionLengthSq(pq);
     if ( !norm )
     {




More information about the wine-cvs mailing list