]> Savannah Git Hosting - gnulib.git/commitdiff
strftime: don't use __THROW
authorJim Meyering <meyering@fb.com>
Mon, 14 Nov 2016 02:15:36 +0000 (18:15 -0800)
committerJim Meyering <meyering@fb.com>
Tue, 15 Nov 2016 04:44:13 +0000 (20:44 -0800)
Each use of __THROW would provoke this from gcc-7-to-be:

  lib/strftime.c:371:1: warning: '__leaf__' attribute has no effect \
    on unit local functions [-Wattributes]
  static int iso_week_days (int, int) __THROW;
  ^~~~~~
* lib/strftime.c (__THROW): Don't define.
Remove each use of __THROW.
* lib/strftime.c (memcpy_lowcase, memcpy_uppcase): Remove __THROW.
(tm_diff, iso_week_days, __strftime_internal): Likewise.

ChangeLog
lib/strftime.c

index ec946ca0b286d20648008146712ced254cfdb8c1..ea9997887985377cc472a904e75a5fced2936a23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2016-11-13  Jim Meyering  <meyering@fb.com>
+
+       strftime: don't use __THROW
+       Each use of __THROW would provoke this from gcc-7-to-be:
+
+         lib/strftime.c:371:1: warning: '__leaf__' attribute has no effect \
+           on unit local functions [-Wattributes]
+         static int iso_week_days (int, int) __THROW;
+         ^~~~~~
+       * lib/strftime.c (__THROW): Don't define.
+       Remove each use of __THROW.
+       * lib/strftime.c (memcpy_lowcase, memcpy_uppcase): Remove __THROW.
+       (tm_diff, iso_week_days, __strftime_internal): Likewise.
+
 2016-11-14  Paul Eggert  <eggert@union>
 
        obstack: port to gcc -fcheck-pointer-bounds
index b906e3cae65658278bbe56ea6e3d406eba6e9cef..8663063e6f672003a07e44214683af02778f7367 100644 (file)
@@ -89,10 +89,6 @@ extern char *tzname[];
 
 #endif
 
-#ifndef __THROW
-# define __THROW
-#endif
-
 /* Shift A right by B bits portably, by dividing A by 2**B and
    truncating towards minus infinity.  A and B should be free of side
    effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
@@ -309,7 +305,7 @@ fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len)
 }
 #else
 static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
-                               size_t len LOCALE_PARAM) __THROW;
+                               size_t len LOCALE_PARAM);
 
 static CHAR_T *
 memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
@@ -320,7 +316,7 @@ memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
 }
 
 static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
-                               size_t len LOCALE_PARAM) __THROW;
+                               size_t len LOCALE_PARAM);
 
 static CHAR_T *
 memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
@@ -336,7 +332,7 @@ memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM)
 /* Yield the difference between *A and *B,
    measured in seconds, ignoring leap seconds.  */
 # define tm_diff ftime_tm_diff
-static int tm_diff (const struct tm *, const struct tm *) __THROW;
+static int tm_diff (const struct tm *, const struct tm *);
 static int
 tm_diff (const struct tm *a, const struct tm *b)
 {
@@ -368,7 +364,7 @@ tm_diff (const struct tm *a, const struct tm *b)
 #define ISO_WEEK_START_WDAY 1 /* Monday */
 #define ISO_WEEK1_WDAY 4 /* Thursday */
 #define YDAY_MINIMUM (-366)
-static int iso_week_days (int, int) __THROW;
+static int iso_week_days (int, int);
 #ifdef __GNUC__
 __inline__
 #endif
@@ -414,7 +410,7 @@ iso_week_days (int yday, int wday)
 static size_t __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG (size_t)
                                    const CHAR_T *, const struct tm *,
                                    bool, bool *
-                                   extra_args_spec LOCALE_PARAM) __THROW;
+                                   extra_args_spec LOCALE_PARAM);
 
 /* Write information from TP into S according to the format
    string FORMAT, writing no more that MAXSIZE characters