Module Name:    src
Committed By:   lukem
Date:           Sat Apr 11 12:18:45 UTC 2009

Modified Files:
        src/usr.bin/comm: comm.c

Log Message:
fix -Wcast-qual issues for WARNS=4


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/comm/comm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/comm/comm.c
diff -u src/usr.bin/comm/comm.c:1.16 src/usr.bin/comm/comm.c:1.17
--- src/usr.bin/comm/comm.c:1.16	Mon Jul 21 14:19:22 2008
+++ src/usr.bin/comm/comm.c	Sat Apr 11 12:18:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: comm.c,v 1.16 2008/07/21 14:19:22 lukem Exp $	*/
+/*	$NetBSD: comm.c,v 1.17 2009/04/11 12:18:45 lukem Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)comm.c	8.4 (Berkeley) 5/4/95";
 #endif
-__RCSID("$NetBSD: comm.c,v 1.16 2008/07/21 14:19:22 lukem Exp $");
+__RCSID("$NetBSD: comm.c,v 1.17 2009/04/11 12:18:45 lukem Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -55,10 +55,10 @@
 
 #define	MAXLINELEN	(LINE_MAX + 1)
 
-char *tabs[] = { "", "\t", "\t\t" };
+const char *tabs[] = { "", "\t", "\t\t" };
 
 FILE   *file(const char *);
-void	show(FILE *, char *, char *);
+void	show(FILE *, const char *, char *);
 void	usage(void);
 
 int
@@ -67,8 +67,8 @@
 	int comp, file1done, file2done, read1, read2;
 	int ch, flag1, flag2, flag3;
 	FILE *fp1, *fp2;
-	char *col1, *col2, *col3;
-	char **p, line1[MAXLINELEN], line2[MAXLINELEN];
+	const char *col1, *col2, *col3, **p;
+	char line1[MAXLINELEN], line2[MAXLINELEN];
 	int (*compare)(const char*,const char*);
 
 	(void)setlocale(LC_ALL, "");
@@ -164,7 +164,7 @@
 }
 
 void
-show(FILE *fp, char *offset, char *buf)
+show(FILE *fp, const char *offset, char *buf)
 {
 	while (printf("%s%s", offset, buf) >= 0 && fgets(buf, MAXLINELEN, fp))
 		;

Reply via email to