Fix / silence some warnings/errors detected with VS-analyze

svn path=/trunk/; revision=57941
This commit is contained in:
Timo Kreuzer 2012-12-18 09:52:07 +00:00
parent ea1421c020
commit 2cdf5f5ce0
2 changed files with 10 additions and 4 deletions

View file

@ -72,6 +72,8 @@
/* INCLUDES *****************************************************************/
#include <hal.h>
#include <suppress.h>
#define NDEBUG
#include <debug.h>
@ -552,6 +554,7 @@ HalpDmaInitializeEisaAdapter(IN PADAPTER_OBJECT AdapterObject,
if (Controller == 1)
{
/* Set the Request Data */
_PRAGMA_WARNING_SUPPRESS(__WARNING_DEREF_NULL_PTR)
WRITE_PORT_UCHAR(&((PDMA1_CONTROL)AdapterBaseVa)->Mode, DmaMode.Byte);
/* Unmask DMA Channel */

View file

@ -39,13 +39,16 @@ HalpAllocateBusHandler(IN INTERFACE_TYPE InterfaceType,
BusSpecificData,
NULL,
&Bus);
if (!Bus) return NULL;
if (!Bus)
{
return NULL;
}
/* Check for a valid interface */
if (InterfaceType != InterfaceTypeUndefined)
{
/* Allocate address ranges and zero them out */
Bus->BusAddresses = ExAllocatePoolWithTag(NonPagedPool,
Bus->BusAddresses = ExAllocatePoolWithTag(NonPagedPoolMustSucceed,
sizeof(SUPPORTED_RANGES),
' laH');
RtlZeroMemory(Bus->BusAddresses, sizeof(SUPPORTED_RANGES));
@ -1153,7 +1156,7 @@ HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath,
PBUS_HANDLER Handler;
NTSTATUS Status;
PAGED_CODE();
DPRINT1("Slot assignment for %d on bus %d\n", BusType, BusNumber);
DPRINT1("Slot assignment for %d on bus %u\n", BusType, BusNumber);
/* Find the handler */
Handler = HalReferenceHandlerForBus(BusType, BusNumber);
@ -1263,7 +1266,7 @@ HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
if (!(Handler) || !(Handler->TranslateBusAddress))
{
DPRINT1("No translator Interface: %x, Bus: %x, Handler: %x!\n", InterfaceType, BusNumber, Handler);
DPRINT1("No translator Interface: %x, Bus: %x, Handler: %p!\n", InterfaceType, BusNumber, Handler);
return FALSE;
}