Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Cleanse an old mangy way of avoiding an unused ...



details:   https://anonhg.NetBSD.org/src/rev/84095d91b059
branches:  trunk
changeset: 346174:84095d91b059
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Jun 30 05:31:00 2016 +0000

description:
Cleanse an old mangy way of avoiding an unused variable warning.
PR 51191 from David Binderman.

diffstat:

 usr.bin/make/suff.c |  22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diffs (90 lines):

diff -r c7558957199d -r 84095d91b059 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Thu Jun 30 05:28:23 2016 +0000
+++ b/usr.bin/make/suff.c       Thu Jun 30 05:31:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.82 2016/06/30 05:28:23 dholland Exp $       */
+/*     $NetBSD: suff.c,v 1.83 2016/06/30 05:31:00 dholland Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.82 2016/06/30 05:28:23 dholland Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.83 2016/06/30 05:31:00 dholland Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c     8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.82 2016/06/30 05:28:23 dholland Exp $");
+__RCSID("$NetBSD: suff.c,v 1.83 2016/06/30 05:31:00 dholland Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -766,6 +766,8 @@
 {
     GNode *gn = (GNode *)gnp;
 
+    (void)dummy;
+
     if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (gn->cohorts))
        gn = (GNode *)Lst_Datum(Lst_Last(gn->cohorts));
     if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
@@ -809,7 +811,7 @@
        fprintf(debug_file, "transformation %s complete\n", gn->name);
     }
 
-    return(dummy ? 0 : 0);
+    return 0;
 }
 
 /*-
@@ -2597,8 +2599,10 @@
 
 static int SuffPrintName(void *s, void *dummy)
 {
+    (void)dummy;
+
     fprintf(debug_file, "%s ", ((Suff *)s)->name);
-    return (dummy ? 0 : 0);
+    return 0;
 }
 
 static int
@@ -2608,6 +2612,8 @@
     int            flags;
     int            flag;
 
+    (void)dummy;
+
     fprintf(debug_file, "# `%s' [%d] ", s->name, s->refCount);
 
     flags = s->flags;
@@ -2640,7 +2646,7 @@
     fprintf(debug_file, "#\tSearch Path: ");
     Dir_PrintPath(s->searchPath);
     fputc('\n', debug_file);
-    return (dummy ? 0 : 0);
+    return 0;
 }
 
 static int
@@ -2648,12 +2654,14 @@
 {
     GNode   *t = (GNode *)tp;
 
+    (void)dummy;
+
     fprintf(debug_file, "%-16s: ", t->name);
     Targ_PrintType(t->type);
     fputc('\n', debug_file);
     Lst_ForEach(t->commands, Targ_PrintCmd, NULL);
     fputc('\n', debug_file);
-    return(dummy ? 0 : 0);
+    return 0;
 }
 
 void



Home | Main Index | Thread Index | Old Index