Module Name:    src
Committed By:   matt
Date:           Wed Jul 20 13:21:12 UTC 2011

Modified Files:
        src/sys/arch/evbppc/mpc85xx: machdep.c

Log Message:
Suppress a GCC 4.5 warning.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/mpc85xx/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.18 src/sys/arch/evbppc/mpc85xx/machdep.c:1.19
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.18	Sun Jul 17 20:54:39 2011
+++ src/sys/arch/evbppc/mpc85xx/machdep.c	Wed Jul 20 13:21:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.18 2011/07/17 20:54:39 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.19 2011/07/20 13:21:12 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -122,8 +122,8 @@
 void	initppc(vaddr_t, vaddr_t, void *, void *, void *, void *);
 
 #define	MEMREGIONS	4
-phys_ram_seg_t physmemr[MEMREGIONS];         /* All memory */
-phys_ram_seg_t availmemr[MEMREGIONS];        /* Available memory */
+phys_ram_seg_t physmemr[MEMREGIONS];		/* All memory */
+phys_ram_seg_t availmemr[2*MEMREGIONS];		/* Available memory */
 static u_int nmemr;
 
 #ifndef CONSFREQ
@@ -536,9 +536,10 @@
 	/*
 	 * Steal pages at the end of memory for the kernel message buffer.
 	 */
-	availmemr[cnt-1].size -= round_page(MSGBUFSIZE);
-	msgbuf_paddr =
-	    (uintptr_t)(availmemr[cnt-1].start + availmemr[cnt-1].size);
+	mr = availmemr + cnt - 1;
+	KASSERT(mr->size >= round_page(MSGBUFSIZE));
+	mr->size -= round_page(MSGBUFSIZE);
+	msgbuf_paddr = (uintptr_t)(mr->start + mr->size);
 
 	/*
 	 * Calculate physmem.

Reply via email to