From dd8fd30935be8f0ae38e651be771244522a3bcb9 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 15 May 1996 07:28:51 +0000 Subject: [PATCH] Prototype + -Wall fixes. --- sys/arch/atari/atari/db_memrw.c | 6 +- sys/arch/atari/atari/trap.c | 6 +- sys/arch/atari/dev/atari5380.c | 7 +- sys/arch/atari/dev/grfabs_fal.c | 27 +++--- sys/arch/atari/dev/kbdmap.c | 145 ++++++++++++++++---------------- sys/arch/atari/dev/zs.c | 9 +- 6 files changed, 101 insertions(+), 99 deletions(-) diff --git a/sys/arch/atari/atari/db_memrw.c b/sys/arch/atari/atari/db_memrw.c index ed1f17ccc4b7..94ef56832900 100644 --- a/sys/arch/atari/atari/db_memrw.c +++ b/sys/arch/atari/atari/db_memrw.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_memrw.c,v 1.3 1996/04/26 06:59:21 leo Exp $ */ +/* $NetBSD: db_memrw.c,v 1.4 1996/05/15 07:28:51 leo Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -66,7 +66,7 @@ db_check(addr, mask) pte = kvtopte((vm_offset_t)addr); if ((*pte & mask) != PG_V) { - db_printf(" address 0x%x not a valid page\n", addr); + db_printf(" address 0x%p not a valid page\n", addr); return 0; } return 1; @@ -118,7 +118,7 @@ db_write_text(dst, ch) pte = kvtopte((vm_offset_t)dst); oldpte = *pte; if ((oldpte & PG_V) == 0) { - db_printf(" address 0x%x not a valid page\n", dst); + db_printf(" address 0x%p not a valid page\n", dst); return; } diff --git a/sys/arch/atari/atari/trap.c b/sys/arch/atari/atari/trap.c index 8a2de06e2e6d..0b2875b3cc03 100644 --- a/sys/arch/atari/atari/trap.c +++ b/sys/arch/atari/atari/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.14 1996/04/29 20:55:44 leo Exp $ */ +/* $NetBSD: trap.c,v 1.15 1996/05/15 07:28:53 leo Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -69,6 +69,10 @@ #include #endif +#ifdef FPU_EMULATE +#include +#endif + #ifdef COMPAT_SUNOS #include extern struct emul emul_sunos; diff --git a/sys/arch/atari/dev/atari5380.c b/sys/arch/atari/dev/atari5380.c index d319b3ca05a4..5334016730a1 100644 --- a/sys/arch/atari/dev/atari5380.c +++ b/sys/arch/atari/dev/atari5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari5380.c,v 1.13 1996/04/26 06:50:12 leo Exp $ */ +/* $NetBSD: atari5380.c,v 1.14 1996/05/15 07:29:03 leo Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -68,7 +68,7 @@ #undef DBG_PIO /* Show the polled-I/O process */ #undef DBG_INF /* Show information transfer process */ #define DBG_NOSTATIC /* No static functions, all in DDB trace*/ -#define DBG_PID 25 /* Keep track of driver */ +#define DBG_PID 15 /* Keep track of driver */ #define REAL_DMA /* Use DMA if sensible */ #if defined(notdef) && defined(FALCON_SCSI) #define REAL_DMA_POLL 1 /* 1: Poll for end of DMA-transfer */ @@ -649,9 +649,6 @@ u_char mode; static void fscsi_int() { - int itype; - int dma_done; - if (scsi_falcon_ipending()) { scsi_falcon_idisable(); ncr_ctrl_intr(cur_softc); diff --git a/sys/arch/atari/dev/grfabs_fal.c b/sys/arch/atari/dev/grfabs_fal.c index 65d906a7202c..f0a588853422 100644 --- a/sys/arch/atari/dev/grfabs_fal.c +++ b/sys/arch/atari/dev/grfabs_fal.c @@ -1,4 +1,4 @@ -/* $NetBSD: grfabs_fal.c,v 1.3 1996/03/10 11:42:35 leo Exp $ */ +/* $NetBSD: grfabs_fal.c,v 1.4 1996/05/15 07:29:05 leo Exp $ */ /* * Copyright (c) 1995 Thomas Gerner. @@ -39,11 +39,13 @@ #include #include #include +#include #include #include #include #include +#include #include /* @@ -73,16 +75,16 @@ struct grfabs_sw fal_vid_sw = { }; static dmode_t vid_modes[] = { - { {NULL,NULL}, "falauto", { 0, 0 }, 0, RES_FALAUTO , &fal_vid_sw}, - { {NULL,NULL}, "sthigh", { 640,400 }, 1, RES_FAL_STHIGH, &fal_vid_sw}, - { {NULL,NULL}, "stmid", { 640,200 }, 2, RES_FAL_STMID , &fal_vid_sw}, - { {NULL,NULL}, "stlow", { 320,200 }, 4, RES_FAL_STLOW , &fal_vid_sw}, - { {NULL,NULL}, "ttlow", { 320,480 }, 8, RES_FAL_TTLOW , &fal_vid_sw}, - { {NULL,NULL}, "vga2", { 640,480 }, 1, RES_VGA2 , &fal_vid_sw}, - { {NULL,NULL}, "vga4", { 640,480 }, 2, RES_VGA4 , &fal_vid_sw}, - { {NULL,NULL}, "vga16", { 640,480 }, 4, RES_VGA16 , &fal_vid_sw}, - { {NULL,NULL}, "vga256", { 640,480 }, 8, RES_VGA256 , &fal_vid_sw}, - { {NULL,NULL}, "highcol", { 320,200 }, 16, RES_DIRECT , &fal_vid_sw}, + { {NULL,NULL}, "falauto", { 0, 0 }, 0, {RES_FALAUTO }, &fal_vid_sw}, + { {NULL,NULL}, "sthigh", { 640,400 }, 1, {RES_FAL_STHIGH}, &fal_vid_sw}, + { {NULL,NULL}, "stmid", { 640,200 }, 2, {RES_FAL_STMID }, &fal_vid_sw}, + { {NULL,NULL}, "stlow", { 320,200 }, 4, {RES_FAL_STLOW }, &fal_vid_sw}, + { {NULL,NULL}, "ttlow", { 320,480 }, 8, {RES_FAL_TTLOW }, &fal_vid_sw}, + { {NULL,NULL}, "vga2", { 640,480 }, 1, {RES_VGA2 }, &fal_vid_sw}, + { {NULL,NULL}, "vga4", { 640,480 }, 2, {RES_VGA4 }, &fal_vid_sw}, + { {NULL,NULL}, "vga16", { 640,480 }, 4, {RES_VGA16 }, &fal_vid_sw}, + { {NULL,NULL}, "vga256", { 640,480 }, 8, {RES_VGA256 }, &fal_vid_sw}, + { {NULL,NULL}, "highcol", { 320,200 }, 16, {RES_DIRECT }, &fal_vid_sw}, { {NULL,NULL}, NULL, } }; @@ -353,8 +355,6 @@ falcon_free_view(v) view_t *v; { if (v) { - dmode_t *md = v->mode; - falcon_remove_view(v); if (v->colormap != &gra_con_cmap) free(v->colormap, M_DEVBUF); @@ -484,7 +484,6 @@ alloc_bitmap(width, height, depth) u_long width, height; u_char depth; { - int i; u_long total_size, bm_size; void *hw_address; bmap_t *bm; diff --git a/sys/arch/atari/dev/kbdmap.c b/sys/arch/atari/dev/kbdmap.c index 26d1f936728a..68046652a24d 100644 --- a/sys/arch/atari/dev/kbdmap.c +++ b/sys/arch/atari/dev/kbdmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbdmap.c,v 1.2 1995/07/24 05:56:14 leo Exp $ */ +/* $NetBSD: kbdmap.c,v 1.3 1996/05/15 07:29:07 leo Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -43,105 +43,104 @@ struct kbdmap ascii_kbdmap = { /* normal map */ { -/* 0x00 */ 0, 0, 0, ESC, 0, '1', 0, '2', -/* 0x04 */ 0, '3', 0, '4', 0, '5', 0, '6', -/* 0x08 */ 0, '7', 0, '8', 0, '9', 0, '0', -/* 0x0c */ 0, '-', 0, '=', 0, '\b', 0, '\t', -/* 0x10 */ C, 'q', C, 'w', C, 'e', C, 'r', -/* 0x14 */ C, 't', C, 'y', C, 'u', C, 'i', -/* 0x18 */ C, 'o', C, 'p', 0, '[', 0, ']', -/* 0x1c */ 0, '\r', 0, 0, C, 'a', C, 's', -/* 0x20 */ C, 'd', C, 'f', C, 'g', C, 'h', -/* 0x24 */ C, 'j', C, 'k', C, 'l', 0, ';', +/* 0x00 */ { 0, 0 }, { 0, ESC }, { 0, '1' }, { 0, '2' }, +/* 0x04 */ { 0, '3' }, { 0, '4' }, { 0, '5' }, { 0, '6' }, +/* 0x08 */ { 0, '7' }, { 0, '8' }, { 0, '9' }, { 0, '0' }, +/* 0x0c */ { 0, '-' }, { 0, '=' }, { 0, '\b' }, { 0, '\t' }, +/* 0x10 */ { C, 'q' }, { C, 'w' }, { C, 'e' }, { C, 'r' }, +/* 0x14 */ { C, 't' }, { C, 'y' }, { C, 'u' }, { C, 'i' }, +/* 0x18 */ { C, 'o' }, { C, 'p' }, { 0, '[' }, { 0, ']' }, +/* 0x1c */ { 0, '\r' }, { 0, 0 }, { C, 'a' }, { C, 's' }, +/* 0x20 */ { C, 'd' }, { C, 'f' }, { C, 'g' }, { C, 'h' }, +/* 0x24 */ { C, 'j' }, { C, 'k' }, { C, 'l' }, { 0, ';' }, #ifdef US_KBD -/* 0x28 */ 0, '\'', 0, '`', 0, 0, 0, '\\', +/* 0x28 */ { 0, '\'' }, { 0, '`' }, { 0, 0 }, { 0, '\\' }, #else -/* 0x28 */ 0, '\'', 0, '`', 0, 0, 0, '#', +/* 0x28 */ { 0, '\'' }, { 0, '`' }, { 0, 0 }, { 0, '#' }, #endif -/* 0x2c */ C, 'z', C, 'x', C, 'c', C, 'v', -/* 0x30 */ C, 'b', C, 'n', C, 'm', 0, ',', -/* 0x34 */ 0, '.', 0, '/', 0, 0, 0, 0, -/* 0x38 */ 0, 0, 0, ' ', 0, 0, S, 0x10, -/* 0x3c */ S, 0x15, S, 0x1A, S, 0x1F, S, 0x24, -/* 0x40 */ S, 0x29, S, 0x2E, S, 0x33, S, 0x38, -/* 0x44 */ S, 0x3D, 0, 0, 0, 0, 0, 0, -/* 0x48 */ S, 0x00, 0, 0, 0, '-', S, 0x0C, -/* 0x4c */ 0, 0, S, 0x08, 0, '+', 0, 0, -/* 0x50 */ S, 0x04, 0, 0, 0, 0, 0, DEL, -/* 0x54 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x5c */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x60 */ +/* 0x2c */ { C, 'z' }, { C, 'x' }, { C, 'c' }, { C, 'v' }, +/* 0x30 */ { C, 'b' }, { C, 'n' }, { C, 'm' }, { 0, ',' }, +/* 0x34 */ { 0, '.' }, { 0, '/' }, { 0, 0 }, { 0, 0 }, +/* 0x38 */ { 0, 0 }, { 0, ' ' }, { 0, 0 }, { S, 0x10 }, +/* 0x3c */ { S, 0x15 }, { S, 0x1A }, { S, 0x1F }, { S, 0x24 }, +/* 0x40 */ { S, 0x29 }, { S, 0x2E }, { S, 0x33 }, { S, 0x38 }, +/* 0x44 */ { S, 0x3D }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x48 */ { S, 0x00 }, { 0, 0 }, { 0, '-' }, { S, 0x0C }, +/* 0x4c */ { 0, 0 }, { S, 0x08 }, { 0, '+' }, { 0, 0 }, +/* 0x50 */ { S, 0x04 }, { 0, 0 }, { 0, 0 }, { 0, DEL }, +/* 0x54 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x58 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x5c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, #ifdef US_KBD -/* 0x60 */ 0, 0, 0, 0, 0, 0, 0, '(', +/* 0x60 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, '(' }, #else -/* 0x60 */ 0, '\\', 0, 0, 0, 0, 0, '(', +/* 0x60 */ { 0, '\\' }, { 0, 0 }, { 0, 0 }, { 0, '(' }, #endif -/* 0x64 */ 0, ')', 0, '/', 0, '*', K, '7', -/* 0x68 */ K, '8', K, '9', K, '4', K, '5', -/* 0x6c */ K, '6', K, '1', K, '2', K, '3', -/* 0x70 */ K, '0', K, '.', K, '\r', 0, 0, -/* 0x74 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x7c */ 0, 0, 0, 0, 0, 0, 0, 0 +/* 0x64 */ { 0, ')' }, { 0, '/' }, { 0, '*' }, { K, '7' }, +/* 0x68 */ { K, '8' }, { K, '9' }, { K, '4' }, { K, '5' }, +/* 0x6c */ { K, '6' }, { K, '1' }, { K, '2' }, { K, '3' }, +/* 0x70 */ { K, '0' }, { K, '.' }, { K, '\r' }, { 0, 0 }, +/* 0x74 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x78 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x7c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, /* shifted map */ { #ifdef US_KBD -/* 0x00 */ 0, 0, 0, ESC, 0, '!', 0, '@', +/* 0x00 */ { 0, 0 }, { 0, ESC }, { 0, '!' }, { 0, '@' }, #else -/* 0x00 */ 0, 0, 0, ESC, 0, '!', 0, '"', +/* 0x00 */ { 0, 0 }, { 0, ESC }, { 0, '!' }, { 0, '"' }, #endif -/* 0x04 */ 0, '#', 0, '$', 0, '%', 0, '^', -/* 0x08 */ 0, '&', 0, '*', 0, '(', 0, ')', -/* 0x0c */ 0, '_', 0, '+', 0, '\b', 0, '\t', -/* 0x10 */ C, 'Q', C, 'W', C, 'E', C, 'R', -/* 0x14 */ C, 'T', C, 'Y', C, 'U', C, 'I', -/* 0x18 */ C, 'O', C, 'P', 0, '{', 0, '}', -/* 0x1c */ 0, '\r', 0, 0, C, 'A', C, 'S', -/* 0x20 */ C, 'D', C, 'F', C, 'G', C, 'H', -/* 0x24 */ C, 'J', C, 'K', C, 'L', 0, ':', +/* 0x04 */ { 0, '#' }, { 0, '$' }, { 0, '%' }, { 0, '^' }, +/* 0x08 */ { 0, '&' }, { 0, '*' }, { 0, '(' }, { 0, ')' }, +/* 0x0c */ { 0, '_' }, { 0, '+' }, { 0, '\b' }, { 0, '\t' }, +/* 0x10 */ { C, 'Q' }, { C, 'W' }, { C, 'E' }, { C, 'R' }, +/* 0x14 */ { C, 'T' }, { C, 'Y' }, { C, 'U' }, { C, 'I' }, +/* 0x18 */ { C, 'O' }, { C, 'P' }, { 0, '{' }, { 0, '}' }, +/* 0x1c */ { 0, '\r' }, { 0, 0 }, { C, 'A' }, { C, 'S' }, +/* 0x20 */ { C, 'D' }, { C, 'F' }, { C, 'G' }, { C, 'H' }, +/* 0x24 */ { C, 'J' }, { C, 'K' }, { C, 'L' }, { 0, ':' }, #ifdef US_KBD -/* 0x28 */ 0, '"', 0, '~', 0, 0, 0, '|', +/* 0x28 */ { 0, '"' }, { 0, '~' }, { 0, 0 }, { 0, '|' }, #else -/* 0x28 */ 0, '@', 0, '_', 0, 0, 0, '~', +/* 0x28 */ { 0, '@' }, { 0, '_' }, { 0, 0 }, { 0, '~' }, #endif -/* 0x2c */ C, 'Z', C, 'X', C, 'C', C, 'V', -/* 0x30 */ C, 'B', C, 'N', C, 'M', 0, '<', -/* 0x34 */ 0, '>', 0, '?', 0, 0, 0, 0, -/* 0x38 */ 0, 0, 0, ' ', 0, 0, S, 0x5d, -/* 0x3c */ S, 0x63, S, 0x69, S, 0x6F, S, 0x75, -/* 0x40 */ S, 0x7b, S, 0x81, S, 0x87, S, 0x8d, -/* 0x44 */ S, 0x93, 0, 0, 0, 0, 0, 0, -/* 0x48 */ S, 0x47, 0, 0, 0, '-', S, 0x57, -/* 0x4c */ 0, 0, S, 0x51, 0, '+', 0, 0, -/* 0x50 */ S, 0x4c, 0, 0, 0, 0, 0, DEL, -/* 0x54 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x5c */ 0, 0, 0, 0, 0, 0, 0, 0, +/* 0x2c */ { C, 'Z' }, { C, 'X' }, { C, 'C' }, { C, 'V' }, +/* 0x30 */ { C, 'B' }, { C, 'N' }, { C, 'M' }, { 0, '<' }, +/* 0x34 */ { 0, '>' }, { 0, '?' }, { 0, 0 }, { 0, 0 }, +/* 0x38 */ { 0, 0 }, { 0, ' ' }, { 0, 0 }, { S, 0x5d }, +/* 0x3c */ { S, 0x63 }, { S, 0x69 }, { S, 0x6F }, { S, 0x75 }, +/* 0x40 */ { S, 0x7b }, { S, 0x81 }, { S, 0x87 }, { S, 0x8d }, +/* 0x44 */ { S, 0x93 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x48 */ { S, 0x47 }, { 0, 0 }, { 0, '-' }, { S, 0x57 }, +/* 0x4c */ { 0, 0 }, { S, 0x51 }, { 0, '+' }, { 0, 0 }, +/* 0x50 */ { S, 0x4c }, { 0, 0 }, { 0, 0 }, { 0, DEL }, +/* 0x54 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x58 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x5c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, /* 0x60 */ #ifdef US_KBD -/* 0x60 */ 0, 0, 0, 0, 0, 0, 0, '(', +/* 0x60 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, '(' }, #else -/* 0x60 */ 0, '|', 0, 0, 0, 0, 0, '(', +/* 0x60 */ { 0, '|' }, { 0, 0 }, { 0, 0 }, { 0, '(' }, #endif -/* 0x64 */ 0, ')', 0, '/', 0, '*', K, '7', -/* 0x68 */ K, '8', K, '9', K, '4', K, '5', -/* 0x6c */ K, '6', K, '1', K, '2', K, '3', -/* 0x70 */ K, '0', K, '.', K, '\r', 0, 0, -/* 0x74 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x7c */ 0, 0, 0, 0, 0, 0, 0, 0 +/* 0x64 */ { 0, ')' }, { 0, '/' }, { 0, '*' }, { K, '7' }, +/* 0x68 */ { K, '8' }, { K, '9' }, { K, '4' }, { K, '5' }, +/* 0x6c */ { K, '6' }, { K, '1' }, { K, '2' }, { K, '3' }, +/* 0x70 */ { K, '0' }, { K, '.' }, { K, '\r' }, { 0, 0 }, +/* 0x74 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x78 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x7c */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, /* alt map FIXME: No altmap yet.. */ { - 0, 0 + { 0, 0 } }, /* shift alt map FIXME: No shift altmap yet... */ { - 0, 0 + { 0, 0 } }, { diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index 05b6d3751985..e80f81825bae 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.19 1996/04/18 08:52:14 leo Exp $ */ +/* $NetBSD: zs.c,v 1.20 1996/05/15 07:29:08 leo Exp $ */ /* * Copyright (c) 1995 L. Weppelman (Atari modifications) @@ -373,8 +373,8 @@ struct proc *p; tp->t_state & TS_CARR_ON) break; tp->t_state |= TS_WOPEN; - if(error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH, - ttopen, 0)) { + if((error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH, + ttopen, 0)) != 0) { if(!(tp->t_state & TS_ISOPEN)) { zs_modem(cs, 0, DMSET); tp->t_state &= ~TS_WOPEN; @@ -1099,10 +1099,13 @@ int unit, wanted, *divisor, *clockmode, *brgenmode, *timeconst; { int bestdiff, bestbps, source; + bestdiff = bestbps = 0; unit = (unit & 1) << 2; for (source = 0; source < 4; ++source) { long freq = zs_frequencies[unit + source]; int diff, bps, div, clkm, brgm, tcon; + + bps = div = clkm = brgm = tcon = 0; switch (source) { case 0: /* BRgen, PCLK */ brgm = ZSWR14_BAUD_ENA|ZSWR14_BAUD_FROM_PCLK;