Author: tkreuzer
Date: Tue Dec 18 09:52:07 2012
New Revision: 57941
URL:
http://svn.reactos.org/svn/reactos?rev=57941&view=rev
Log:
[HAL]
Fix / silence some warnings/errors detected with VS-analyze
Modified:
trunk/reactos/hal/halx86/generic/dma.c
trunk/reactos/hal/halx86/legacy/bussupp.c
Modified: trunk/reactos/hal/halx86/generic/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] Tue Dec 18 09:52:07 2012
@@ -72,6 +72,8 @@
/* INCLUDES *****************************************************************/
#include <hal.h>
+#include <suppress.h>
+
#define NDEBUG
#include <debug.h>
@@ -552,6 +554,7 @@
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 */
Modified: trunk/reactos/hal/halx86/legacy/bussupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bussupp.…
==============================================================================
--- trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] Tue Dec 18 09:52:07 2012
@@ -39,13 +39,16 @@
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 @@
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 @@
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;
}