From 006828e61c3e63e0f3a688038110d4193af33b17 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 21 May 2010 12:14:46 +0100 Subject: additional warning fixes & clarification for DDK's OACR/Prefast --- libusb/os/poll_windows.c | 6 ++++++ libusb/os/windows_usb.c | 1 + 2 files changed, 7 insertions(+) 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 +// 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 -- cgit v1.2.1