Subject: one little fix in sys/arch/amiga/amiga/pmap.c
To: None <is@netbsd.org>
From: S.P.Zeidler <spz@serpens.de>
List: port-amiga
Date: 09/23/2004 22:09:01
Hi,

this only bites if you compile a kernel with DEBUG:
--- pmap.c      2004-09-23 23:09:03.000000000 +0200
+++ pmap.c-fixed        2004-09-23 17:00:55.000000000 +0200
@@ -1563,7 +1563,7 @@
        paddr_t *pap;
 {
        boolean_t rv = FALSE;
-       paddr_t pa;
+       paddr_t pa = 0;
        u_int pte;
 
 #ifdef DEBUG
---------------

due to the compiler not realizing that for:
        boolean_t rv = FALSE;
        paddr_t pa;

(check something, if yes do.)
                        pa = (pte & PG_FRAME) | (va & ~PG_FRAME);
and
                        rv = TRUE;

and later do in a DEBUG ifdef:
                if (rv)
                        printf("%lx\n", pa);

does mean that pa can't be used un-initialized. The =0 just shuts the
compiler up, any value would do.

regards,
	spz
-- 
spz@serpens.de (S.P.Zeidler)