o Reduce warns by adding default case to switch.
authorMax Okumoto <okumoto@dragonflybsd.org>
Fri, 10 Dec 2004 00:38:21 +0000 (00:38 +0000)
committerMax Okumoto <okumoto@dragonflybsd.org>
Fri, 10 Dec 2004 00:38:21 +0000 (00:38 +0000)
o Constify char pointer.

usr.bin/make/str.c

index 82d197e..49a4776 100644 (file)
@@ -37,7 +37,7 @@
  *
  * @(#)str.c   5.8 (Berkeley) 6/1/90
  * $FreeBSD: src/usr.bin/make/str.c,v 1.12.2.2 2004/02/23 12:10:57 ru Exp $
- * $DragonFly: src/usr.bin/make/str.c,v 1.8 2004/11/13 07:25:17 dillon Exp $
+ * $DragonFly: src/usr.bin/make/str.c,v 1.9 2004/12/10 00:38:21 okumoto Exp $
  */
 
 #include "make.h"
@@ -222,8 +222,12 @@ brk_string(char *str, int *store_argc, Boolean expand)
                        case 't':
                                ch = '\t';
                                break;
+                       default:
+                               break;
                        }
                        break;
+               default:
+                       break;
                }
                if (!start)
                        start = t;
@@ -414,7 +418,7 @@ Str_SYSVMatch(const char *word, const char *pattern, int *len)
 void
 Str_SYSVSubst(Buffer buf, const char *pat, const char *src, int len)
 {
-    char *m;
+    const char *m;
 
     if ((m = strchr(pat, '%')) != NULL) {
        /* Copy the prefix */