Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Use __dead consistently. If it doesn't exist, d...



details:   https://anonhg.NetBSD.org/src/rev/4691f8589a3f
branches:  trunk
changeset: 769623:4691f8589a3f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Sep 16 15:38:03 2011 +0000

description:
Use __dead consistently. If it doesn't exist, define it away.

diffstat:

 usr.bin/make/compat.c  |   8 ++++----
 usr.bin/make/job.c     |  12 ++++++------
 usr.bin/make/main.c    |   8 ++++----
 usr.bin/make/make.c    |   8 ++++----
 usr.bin/make/make.h    |   6 +++++-
 usr.bin/make/nonints.h |   4 ++--
 6 files changed, 25 insertions(+), 21 deletions(-)

diffs (196 lines):

diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/compat.c     Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.83 2011/08/14 13:06:09 christos Exp $     */
+/*     $NetBSD: compat.c,v 1.84 2011/09/16 15:38:03 joerg Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.83 2011/08/14 13:06:09 christos Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.84 2011/09/16 15:38:03 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c   8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.83 2011/08/14 13:06:09 christos Exp $");
+__RCSID("$NetBSD: compat.c,v 1.84 2011/09/16 15:38:03 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -121,7 +121,7 @@
 
 static GNode       *curTarg = NULL;
 static GNode       *ENDNode;
-static void CompatInterrupt(int);
+static void CompatInterrupt(int) __dead;
 
 static void
 Compat_Init(void)
diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/job.c
--- a/usr.bin/make/job.c        Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/job.c        Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.159 2011/08/28 03:54:07 sjg Exp $    */
+/*     $NetBSD: job.c,v 1.160 2011/09/16 15:38:03 joerg Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.159 2011/08/28 03:54:07 sjg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.160 2011/09/16 15:38:03 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c      8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.159 2011/08/28 03:54:07 sjg Exp $");
+__RCSID("$NetBSD: job.c,v 1.160 2011/09/16 15:38:03 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -352,7 +352,7 @@
 static char *JobOutput(Job *, char *, char *, int);
 static void JobDoOutput(Job *, Boolean);
 static Shell *JobMatchShell(const char *);
-static void JobInterrupt(int, int);
+static void JobInterrupt(int, int) __dead;
 static void JobRestartJobs(void);
 static void JobTokenAdd(void);
 static void JobSigLock(sigset_t *);
@@ -523,14 +523,14 @@
  *
  *-----------------------------------------------------------------------
  */
-static void
+__dead static void
 JobPassSig_int(int signo)
 {
     /* Run .INTERRUPT target then exit */
     JobInterrupt(TRUE, signo);
 }
 
-static void
+__dead static void
 JobPassSig_term(int signo)
 {
     /* Dont run .INTERRUPT target then exit */
diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/main.c
--- a/usr.bin/make/main.c       Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/main.c       Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.197 2011/05/04 20:38:31 sjg Exp $   */
+/*     $NetBSD: main.c,v 1.198 2011/09/16 15:38:04 joerg Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.197 2011/05/04 20:38:31 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.198 2011/09/16 15:38:04 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.197 2011/05/04 20:38:31 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.198 2011/09/16 15:38:04 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -178,7 +178,7 @@
 static char *          Check_Cwd_av(int, char **, int);
 static void            MainParseArgs(int, char **);
 static int             ReadMakefile(const void *, const void *);
-static void            usage(void);
+static void            usage(void) __dead;
 
 static Boolean         ignorePWD;      /* if we use -C, PWD is meaningless */
 static char objdir[MAXPATHLEN + 1];    /* where we chdir'ed to */
diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/make.c
--- a/usr.bin/make/make.c       Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/make.c       Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.83 2010/11/25 21:31:09 christos Exp $       */
+/*     $NetBSD: make.c,v 1.84 2011/09/16 15:38:04 joerg Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: make.c,v 1.83 2010/11/25 21:31:09 christos Exp $";
+static char rcsid[] = "$NetBSD: make.c,v 1.84 2011/09/16 15:38:04 joerg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)make.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: make.c,v 1.83 2010/11/25 21:31:09 christos Exp $");
+__RCSID("$NetBSD: make.c,v 1.84 2011/09/16 15:38:04 joerg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -139,7 +139,7 @@
 static int MakeBuildChild(void *, void *);
 static int MakeBuildParent(void *, void *);
 
-static void
+__dead static void
 make_abort(GNode *gn, int line)
 {
     static int two = 2;
diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/make.h
--- a/usr.bin/make/make.h       Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/make.h       Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.86 2011/05/04 20:38:32 sjg Exp $    */
+/*     $NetBSD: make.h,v 1.87 2011/09/16 15:38:04 joerg Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,6 +111,10 @@
 #endif
 #endif
 
+#if !defined(__dead)
+#define __dead
+#endif
+
 #include "sprite.h"
 #include "lst.h"
 #include "hash.h"
diff -r 606654e9c935 -r 4691f8589a3f usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Fri Sep 16 15:36:18 2011 +0000
+++ b/usr.bin/make/nonints.h    Fri Sep 16 15:38:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.62 2010/12/25 04:57:07 dholland Exp $    */
+/*     $NetBSD: nonints.h,v 1.63 2011/09/16 15:38:04 joerg Exp $       */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
     __attribute__((__format__(__printf__, 1, 2),__noreturn__));
 void DieHorribly(void) __attribute__((__noreturn__));
 int PrintAddr(void *, void *);
-void Finish(int);
+void Finish(int) __dead;
 int eunlink(const char *);
 void execError(const char *, const char *);
 char *getTmpdir(void);



Home | Main Index | Thread Index | Old Index