Fixed coverity issue 1047593
authorArmin Novak <anovak@thinstuff.com>
Thu, 29 Aug 2013 08:05:42 +0000 (10:05 +0200)
committerArmin Novak <anovak@thinstuff.com>
Thu, 5 Sep 2013 10:14:33 +0000 (12:14 +0200)
winpr/libwinpr/rpc/ndr.c

index 0cec370..3434238 100644 (file)
@@ -143,6 +143,10 @@ void NdrProcessParams(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, NDR_P
 
        for (i = 0; i < numberParams; i++)
        {
+#ifdef __x86_64__
+               float tmp;
+#endif
+
                arg = pStubMsg->StackTop + params[i].StackOffset;
                fmt = (PFORMAT_STRING) &pStubMsg->StubDesc->pFormatTypes[params[i].Type.Offset];
 
@@ -151,7 +155,7 @@ void NdrProcessParams(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, NDR_P
                                !(params[i].Attributes.IsSimpleRef) &&
                                ((params[i].Type.FormatChar) == FC_FLOAT) && !fpuArgs)
                {
-                       float tmp = *(double*) arg;
+                       tmp = *(double*) arg;
                        arg = (unsigned char*) &tmp;
                }
 #endif