Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Fix some unused warnings



details:   https://anonhg.NetBSD.org/src/rev/5fdc00f47ed1
branches:  trunk
changeset: 362972:5fdc00f47ed1
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri Mar 04 23:17:16 2022 +0000

description:
Fix some unused warnings

diffstat:

 usr.bin/make/filemon/filemon_dev.c |  12 ++++++++----
 usr.bin/make/meta.c                |  10 +++++-----
 usr.bin/make/suff.c                |   6 +++---
 3 files changed, 16 insertions(+), 12 deletions(-)

diffs (118 lines):

diff -r 648bd123514d -r 5fdc00f47ed1 usr.bin/make/filemon/filemon_dev.c
--- a/usr.bin/make/filemon/filemon_dev.c        Fri Mar 04 21:12:03 2022 +0000
+++ b/usr.bin/make/filemon/filemon_dev.c        Fri Mar 04 23:17:16 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filemon_dev.c,v 1.8 2021/02/01 21:09:25 rillig Exp $   */
+/*     $NetBSD: filemon_dev.c,v 1.9 2022/03/04 23:17:16 sjg Exp $      */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -46,6 +46,10 @@
 #define _PATH_FILEMON  "/dev/filemon"
 #endif
 
+#ifndef MAKE_ATTR_UNUSED
+#define MAKE_ATTR_UNUSED        __attribute__((__unused__))
+#endif
+
 struct filemon {
        int     fd;
 };
@@ -101,7 +105,7 @@
 }
 
 void
-filemon_setpid_parent(struct filemon *F, pid_t pid)
+filemon_setpid_parent(struct filemon *F MAKE_ATTR_UNUSED, pid_t pid MAKE_ATTR_UNUSED)
 {
        /* Nothing to do!  */
 }
@@ -137,14 +141,14 @@
 }
 
 int
-filemon_readfd(const struct filemon *F)
+filemon_readfd(const struct filemon *F MAKE_ATTR_UNUSED)
 {
 
        return -1;
 }
 
 int
-filemon_process(struct filemon *F)
+filemon_process(struct filemon *F MAKE_ATTR_UNUSED)
 {
 
        return 0;
diff -r 648bd123514d -r 5fdc00f47ed1 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Fri Mar 04 21:12:03 2022 +0000
+++ b/usr.bin/make/meta.c       Fri Mar 04 23:17:16 2022 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.198 2022/02/09 21:28:57 rillig Exp $ */
+/*      $NetBSD: meta.c,v 1.199 2022/03/04 23:17:16 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -668,7 +668,7 @@
  * It does not disturb our state.
  */
 void
-meta_job_child(Job *job)
+meta_job_child(Job *job MAKE_ATTR_UNUSED)
 {
 #ifdef USE_FILEMON
     BuildMon *pbm;
@@ -693,7 +693,7 @@
 }
 
 void
-meta_job_parent(Job *job, pid_t pid)
+meta_job_parent(Job *job MAKE_ATTR_UNUSED, pid_t pid MAKE_ATTR_UNUSED)
 {
 #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV)
     BuildMon *pbm;
@@ -710,7 +710,7 @@
 }
 
 int
-meta_job_fd(Job *job)
+meta_job_fd(Job *job MAKE_ATTR_UNUSED)
 {
 #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV)
     BuildMon *pbm;
@@ -728,7 +728,7 @@
 }
 
 int
-meta_job_event(Job *job)
+meta_job_event(Job *job MAKE_ATTR_UNUSED)
 {
 #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV)
     BuildMon *pbm;
diff -r 648bd123514d -r 5fdc00f47ed1 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Fri Mar 04 21:12:03 2022 +0000
+++ b/usr.bin/make/suff.c       Fri Mar 04 23:17:16 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.365 2022/03/03 19:55:27 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.366 2022/03/04 23:17:16 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.365 2022/03/03 19:55:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.366 2022/03/04 23:17:16 sjg Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -1019,7 +1019,7 @@
 /*ARGSUSED*/
 static void
 CandidateList_Add(CandidateList *list, char *srcName, Candidate *targ,
-                 Suffix *suff, const char *debug_tag)
+                 Suffix *suff, const char *debug_tag MAKE_ATTR_UNUSED)
 {
        Candidate *cand = Candidate_New(srcName, targ->prefix, suff, targ,
            NULL);



Home | Main Index | Thread Index | Old Index