summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-05-21 12:14:46 +0100
committerPete Batard <pbatard@gmail.com>2010-05-21 12:14:46 +0100
commit006828e61c3e63e0f3a688038110d4193af33b17 (patch)
tree86388f464046e1451acc4acd55fe90bd1312126d
parentc8a7c320b6c2d0db115c552eda25e3fe0ae53356 (diff)
downloadlibusb-006828e61c3e63e0f3a688038110d4193af33b17.tar.gz
additional warning fixes & clarification for DDK's OACR/Prefast
-rw-r--r--libusb/os/poll_windows.c6
-rw-r--r--libusb/os/windows_usb.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c
index bd4fefb..10ae696 100644
--- a/libusb/os/poll_windows.c
+++ b/libusb/os/poll_windows.c
@@ -47,6 +47,12 @@
#include <libusbi.h>
+// The following prevents "The function 'InitializeCriticalSection' must be called from within
+// a try/except block" errors when using the MS's WDK OACR/Prefast
+#if defined(_PREFAST_)
+#pragma warning(disable:28125)
+#endif
+
// Uncomment to debug the polling layer
//#define DEBUG_POLL_WINDOWS
#if defined(DEBUG_POLL_WINDOWS)
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index e0c7dd3..fcc2735 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -50,6 +50,7 @@
#include "poll_windows.h"
#include "windows_usb.h"
+// The following prevents "banned API" errors when using the MS's WDK OACR/Prefast
#if defined(_PREFAST_)
#pragma warning(disable:28719)
#endif