Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi/acpica fix undefined return values of Read/Writ...
details: https://anonhg.NetBSD.org/src/rev/4f509be4dc8f
branches: trunk
changeset: 747452:4f509be4dc8f
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Sep 15 19:41:30 2009 +0000
description:
fix undefined return values of Read/WriteMemory, found by clang
static analyzer
diffstat:
sys/dev/acpi/acpica/OsdHardware.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r c459e76c3fb8 -r 4f509be4dc8f sys/dev/acpi/acpica/OsdHardware.c
--- a/sys/dev/acpi/acpica/OsdHardware.c Tue Sep 15 19:38:15 2009 +0000
+++ b/sys/dev/acpi/acpica/OsdHardware.c Tue Sep 15 19:41:30 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: OsdHardware.c,v 1.4 2007/12/12 23:33:22 jmcneill Exp $ */
+/* $NetBSD: OsdHardware.c,v 1.5 2009/09/15 19:41:30 drochner Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.4 2007/12/12 23:33:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.5 2009/09/15 19:41:30 drochner Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -127,7 +127,7 @@
AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
{
void *LogicalAddress;
- ACPI_STATUS rv;
+ ACPI_STATUS rv = AE_OK;
LogicalAddress = AcpiOsMapMemory(Address, Width / 8);
if (LogicalAddress == NULL)
@@ -164,7 +164,7 @@
AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
{
void *LogicalAddress;
- ACPI_STATUS rv;
+ ACPI_STATUS rv = AE_OK;
LogicalAddress = AcpiOsMapMemory(Address, Width / 8);
if (LogicalAddress == NULL)
Home |
Main Index |
Thread Index |
Old Index