nmh-commits
[Top][All Lists]
Advanced

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

[Nmh-commits] nmh h/prototypes.h ChangeLog


From: Peter Maydell
Subject: [Nmh-commits] nmh h/prototypes.h ChangeLog
Date: Mon, 02 Jun 2008 21:49:07 +0000

CVSROOT:        /cvsroot/nmh
Module name:    nmh
Changes by:     Peter Maydell <pm215>   08/06/02 21:49:07

Modified files:
        h              : prototypes.h 
        .              : ChangeLog 

Log message:
        If we're compiling with gcc, mark adios() as never returning (better 
code
        and fewer spurious 'uninitialized variable) warnings)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/h/prototypes.h?cvsroot=nmh&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&r1=1.272&r2=1.273

Patches:
Index: h/prototypes.h
===================================================================
RCS file: /cvsroot/nmh/nmh/h/prototypes.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- h/prototypes.h      4 May 2008 20:58:36 -0000       1.21
+++ h/prototypes.h      2 Jun 2008 21:49:07 -0000       1.22
@@ -2,9 +2,18 @@
 /*
  * prototypes.h -- various prototypes
  *
- * $Id: prototypes.h,v 1.21 2008/05/04 20:58:36 pm215 Exp $
+ * $Id: prototypes.h,v 1.22 2008/06/02 21:49:07 pm215 Exp $
  */
 
+/* If we're using gcc then give it some information about
+ * functions that abort.
+ */
+#if __GNUC__ > 2
+#define NORETURN __attribute__((__noreturn__)
+#else
+#define NORETURN
+#endif
+
 /*
  * missing system prototypes
  */
@@ -25,7 +34,7 @@
 /*
  * prototypes from the nmh subroutine library
  */
-void adios (char *, char *, ...);
+void adios (char *, char *, ...) NORETURN;
 void admonish (char *, char *, ...);
 void advertise (char *, char *, char *, va_list);
 void advise (char *, char *, ...);

Index: ChangeLog
===================================================================
RCS file: /cvsroot/nmh/nmh/ChangeLog,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -b -r1.272 -r1.273
--- ChangeLog   1 Jun 2008 16:50:22 -0000       1.272
+++ ChangeLog   2 Jun 2008 21:49:07 -0000       1.273
@@ -1,3 +1,9 @@
+2008-06-02  Peter Maydell  <address@hidden>
+
+       * h/prototypes.h: mark adios() as not returning, so gcc
+       can make a better job of avoiding spurious "uninitialized
+       variable" warnings.
+
 2008-06-01  Peter Maydell  <address@hidden>
 
        * docs/README.developers: update the bits about doing a




reply via email to

[Prev in Thread] Current Thread [Next in Thread]