Module Name:    src
Committed By:   christos
Date:           Mon Mar 24 19:58:04 UTC 2014

Modified Files:
        src/sys/arch/next68k/next68k: disksubr.c machdep.c rtc.c trap.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/next68k/next68k/disksubr.c
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/next68k/next68k/rtc.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/next68k/next68k/trap.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/next68k/next68k/disksubr.c
diff -u src/sys/arch/next68k/next68k/disksubr.c:1.26 src/sys/arch/next68k/next68k/disksubr.c:1.27
--- src/sys/arch/next68k/next68k/disksubr.c:1.26	Mon Mar 24 15:57:47 2014
+++ src/sys/arch/next68k/next68k/disksubr.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.27 2014/03/24 19:58:04 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.27 2014/03/24 19:58:04 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -272,7 +272,7 @@ build_nextstep_label(struct next68k_disk
 				p->cp_minfree = 5; /* set some default */
 			p->cp_cpg = lp->d_partitions[nbp].p_cpg;
 		} else {
-			memset (p, 0, sizeof(*p);
+			memset (p, 0, sizeof(*p));
 			p->cp_size = -1;
 			p->cp_offset = -1;
 			p->cp_bsize = -1;

Index: src/sys/arch/next68k/next68k/machdep.c
diff -u src/sys/arch/next68k/next68k/machdep.c:1.109 src/sys/arch/next68k/next68k/machdep.c:1.110
--- src/sys/arch/next68k/next68k/machdep.c:1.109	Fri Aug 10 21:21:04 2012
+++ src/sys/arch/next68k/next68k/machdep.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -311,15 +311,12 @@ cpu_startup(void)
 	initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char	cpu_model[124];
-
 void
 identifycpu(void)
 {
-	const char *mc;
+/*###317 [cc] error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token%%%*/
+	const char *mc, *mmu_str *fpu_str, *cache_str;
+/*###318 [cc] error: unused variable 'len' [-Werror=unused-variable]%%%*/
 	int len;
 
 	/*
@@ -340,67 +337,74 @@ identifycpu(void)
 		goto lose;
 	}
 
-	sprintf(cpu_model, "NeXT/MC680%s CPU",mc);
-
 	/*
 	 * ...and the MMU type.
 	 */
 	switch (mmutype) {
 	case MMU_68040:
 	case MMU_68030:
-		strcat(cpu_model, "+MMU");
+/*###344 [cc] error: 'mmu_str' undeclared (first use in this function)%%%*/
+/*###344 [cc] note: each undeclared identifier is reported only once for each function it appears in%%%*/
+		mmu_str = "+MMU";
 		break;
 	case MMU_68851:
-		strcat(cpu_model, ", MC68851 MMU");
+		mmu_str = ", MC68851 MMU";
 		break;
 	case MMU_HP:
-		strcat(cpu_model, ", HP MMU");
+		mmu_str = ", HP MMU";
 		break;
 	default:
-		printf("%s\nunknown MMU type %d\n", cpu_model, mmutype);
+		printf("MC680%s: unknown MMU type %d\n", mc, mmutype);
 		panic("startup");
 	}
 
-	len = strlen(cpu_model);
-
 	/*
 	 * ...and the FPU type.
 	 */
 	switch (fputype) {
 	case FPU_68040:
-		len += sprintf(cpu_model + len, "+FPU");
+/*###362 [cc] error: 'fpu_str' undeclared (first use in this function)%%%*/
+		fpu_str = "+FPU";
 		break;
 	case FPU_68882:
-		len += sprintf(cpu_model + len, ", MC68882 FPU");
+		fpu_str = ", MC68882 FPU";
 		break;
 	case FPU_68881:
-		len += sprintf(cpu_model + len, ", MHz MC68881 FPU");
+		fpu_str = ", MHz MC68881 FPU";
 		break;
 	default:
-		len += sprintf(cpu_model + len, ", unknown FPU");
+		fpu_str = ", unknown FPU";
 	}
 
 	/*
 	 * ...and finally, the cache type.
 	 */
 	if (cputype == CPU_68040)
-		sprintf(cpu_model + len, ", 4k on-chip physical I/D caches");
+/*###378 [cc] error: 'cache_str' undeclared (first use in this function)%%%*/
+		cache_str = ", 4k on-chip physical I/D caches";
 	else {
 #if defined(ENABLE_HP_CODE)
 		switch (ectype) {
 		case EC_VIRT:
-			sprintf(cpu_model + len,
-			    ", virtual-address cache");
+			cache_str = ", virtual-address cache";
 			break;
 		case EC_PHYS:
-			sprintf(cpu_model + len,
-			    ", physical-address cache");
+			cache_str = ", physical-address cache";
+			break;
+		default:
+			cache_str = "";
 			break;
 		}
+#else
+		cache_str = "";
 #endif
 	}
 
-	printf("%s\n", cpu_model);
+/*###397 [cc] error: implicit declaration of function 'cpu_setmodel' [-Werror=implicit-function-declaration]%%%*/
+	cpu_setmodel("NeXT/MC680%s CPU%s%s%s", mc, mmu_str, fpu_str, cache_str);
+/*###398 [cc] error: implicit declaration of function 'cpu_getmodel' [-Werror=implicit-function-declaration]%%%*/
+/*###398 [cc] error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]%%%*/
+	printf("%s\n", cpu_getmodel());
 
 	return;
  lose:

Index: src/sys/arch/next68k/next68k/rtc.c
diff -u src/sys/arch/next68k/next68k/rtc.c:1.15 src/sys/arch/next68k/next68k/rtc.c:1.16
--- src/sys/arch/next68k/next68k/rtc.c:1.15	Sat Dec 12 09:44:09 2009
+++ src/sys/arch/next68k/next68k/rtc.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*      $NetBSD: rtc.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $        */
+/*      $NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $        */
 /*
  * Copyright (c) 1998 Darrin Jewell
  * Copyright (c) 1997 Rolf Grossmann 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.15 2009/12/12 14:44:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>          /* for panic */
@@ -272,6 +272,7 @@ gettime_old(todr_chip_handle_t tch, stru
 {
 	u_char h, y;
 	
+/*###275 [cc] error: variable 'val' set but not used [-Werror=unused-but-set-variable]%%%*/
 	struct clock_ymdhms val;
 	y = FROMBCD(rtc_read(RTC_YR));
 	if (y >= 69) {

Index: src/sys/arch/next68k/next68k/trap.c
diff -u src/sys/arch/next68k/next68k/trap.c:1.85 src/sys/arch/next68k/next68k/trap.c:1.86
--- src/sys/arch/next68k/next68k/trap.c:1.85	Sun Feb 19 16:06:22 2012
+++ src/sys/arch/next68k/next68k/trap.c	Mon Mar 24 15:58:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.85 2012/02/19 21:06:22 rmind Exp $	*/
+/*	$NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $	*/
 
 /*
  * This file was taken from mvme68k/mvme68k/trap.c
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.85 2012/02/19 21:06:22 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -270,6 +270,7 @@ trap(struct frame *fp, int type, unsigne
 	int s;
 	int rv;
 	u_quad_t sticks = 0 /* XXX initialiser works around compiler bug */;
+/*###273 [cc] error: variable 'panicking' set but not used [-Werror=unused-but-set-variable]%%%*/
 	static int panicking = 0;
 
 	curcpu()->ci_data.cpu_ntrap++;

Reply via email to