Module Name: src
Committed By: lukem
Date: Mon Apr 13 07:19:55 UTC 2009
Modified Files:
src/usr.bin/sdiff: sdiff.c
Log Message:
Fix -Wshadow issues
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/sdiff/sdiff.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/sdiff/sdiff.c
diff -u src/usr.bin/sdiff/sdiff.c:1.1 src/usr.bin/sdiff/sdiff.c:1.2
--- src/usr.bin/sdiff/sdiff.c:1.1 Sun Feb 18 22:13:43 2007
+++ src/usr.bin/sdiff/sdiff.c Mon Apr 13 07:19:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sdiff.c,v 1.1 2007/02/18 22:13:43 rmind Exp $ */
+/* $NetBSD: sdiff.c,v 1.2 2009/04/13 07:19:55 lukem Exp $ */
/* $OpenBSD: sdiff.c,v 1.20 2006/09/19 05:52:23 otto Exp $ */
/*
@@ -496,7 +496,7 @@
* Takes into account that tabs can take multiple columns.
*/
static void
-println(const char *s1, const char div, const char *s2)
+println(const char *s1, const char divc, const char *s2)
{
size_t col;
@@ -509,7 +509,7 @@
}
/* Only print left column. */
- if (div == ' ' && !s2) {
+ if (divc == ' ' && !s2) {
putchar('\n');
return;
}
@@ -523,10 +523,10 @@
* need to add the space for padding.
*/
if (!s2) {
- printf(" %c\n", div);
+ printf(" %c\n", divc);
return;
}
- printf(" %c ", div);
+ printf(" %c ", divc);
col += 3;
/* Skip angle bracket and space. */
@@ -747,14 +747,14 @@
* Queues up a diff line.
*/
static void
-enqueue(char *left, char div, char *right)
+enqueue(char *left, char divc, char *right)
{
struct diffline *diffp;
if (!(diffp = malloc(sizeof(struct diffline))))
err(2, "enqueue");
diffp->left = left;
- diffp->div = div;
+ diffp->div = divc;
diffp->right = right;
SIMPLEQ_INSERT_TAIL(&diffhead, diffp, diffentries);
}