summaryrefslogtreecommitdiff
path: root/usb/umdf2_fx2
diff options
context:
space:
mode:
authorWei Mao <[email protected]>2017-03-14 14:41:04 -0700
committerWei Mao <[email protected]>2017-03-14 14:41:04 -0700
commit360ed51d5a49fb859ba1f6e1bc4be8ceca39c1bc (patch)
tree0141b8454ac8a375d98641b4362960bced97628c /usb/umdf2_fx2
parent8dc7279b896be7a1aa95decc2e759fb1f27a5271 (diff)
[usb] Fix Code Analysis Warnings
Diffstat (limited to 'usb/umdf2_fx2')
-rw-r--r--usb/umdf2_fx2/exe/testapp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usb/umdf2_fx2/exe/testapp.c b/usb/umdf2_fx2/exe/testapp.c
index fce915b5..05835521 100644
--- a/usb/umdf2_fx2/exe/testapp.c
+++ b/usb/umdf2_fx2/exe/testapp.c
@@ -21,10 +21,10 @@ Environment:
--*/
-
+
#include <DriverSpecs.h>
-_Analysis_mode_(_Analysis_code_type_user_code_)
-
+_Analysis_mode_(_Analysis_code_type_user_code_)
+
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
@@ -117,6 +117,7 @@ GetDevicePath(
deviceInterfaceList = (PWSTR)malloc(deviceInterfaceListLength * sizeof(WCHAR));
if (deviceInterfaceList == NULL) {
+ bRet = FALSE;
printf("Error allocating memory for device interface list.\n");
goto clean0;
}
@@ -157,7 +158,9 @@ clean0:
return bRet;
}
-
+_Check_return_
+_Ret_notnull_
+_Success_(return != INVALID_HANDLE_VALUE)
HANDLE
OpenDevice(
_In_ BOOL Synchronous
@@ -1201,6 +1204,7 @@ exit:
}
if (hWrite != INVALID_HANDLE_VALUE) {
+ _Analysis_assume_(hWrite != NULL);
CloseHandle(hWrite);
}