Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/next68k/next68k fix typo.



details:   https://anonhg.NetBSD.org/src/rev/b80cf87a3b73
branches:  trunk
changeset: 328047:b80cf87a3b73
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 24 19:58:04 2014 +0000

description:
fix typo.

diffstat:

 sys/arch/next68k/next68k/disksubr.c |   6 +-
 sys/arch/next68k/next68k/machdep.c  |  56 +++++++++++++++++++-----------------
 sys/arch/next68k/next68k/rtc.c      |   5 +-
 sys/arch/next68k/next68k/trap.c     |   5 +-
 4 files changed, 39 insertions(+), 33 deletions(-)

diffs (209 lines):

diff -r a8022705bdef -r b80cf87a3b73 sys/arch/next68k/next68k/disksubr.c
--- a/sys/arch/next68k/next68k/disksubr.c       Mon Mar 24 19:57:47 2014 +0000
+++ b/sys/arch/next68k/next68k/disksubr.c       Mon Mar 24 19:58:04 2014 +0000
@@ -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 @@
                                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;
diff -r a8022705bdef -r b80cf87a3b73 sys/arch/next68k/next68k/machdep.c
--- a/sys/arch/next68k/next68k/machdep.c        Mon Mar 24 19:57:47 2014 +0000
+++ b/sys/arch/next68k/next68k/machdep.c        Mon Mar 24 19:58:04 2014 +0000
@@ -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 @@
        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 @@
                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:
diff -r a8022705bdef -r b80cf87a3b73 sys/arch/next68k/next68k/rtc.c
--- a/sys/arch/next68k/next68k/rtc.c    Mon Mar 24 19:57:47 2014 +0000
+++ b/sys/arch/next68k/next68k/rtc.c    Mon Mar 24 19:58:04 2014 +0000
@@ -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 @@
 {
        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) {
diff -r a8022705bdef -r b80cf87a3b73 sys/arch/next68k/next68k/trap.c
--- a/sys/arch/next68k/next68k/trap.c   Mon Mar 24 19:57:47 2014 +0000
+++ b/sys/arch/next68k/next68k/trap.c   Mon Mar 24 19:58:04 2014 +0000
@@ -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 @@
        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++;



Home | Main Index | Thread Index | Old Index