diff options
| author | Paul Eggert | 2017-06-15 13:29:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-06-15 13:30:30 -0700 |
| commit | 21d10e59f89a5bb72829ffb8ebe4463ba4fac124 (patch) | |
| tree | 5e6d98853562542a09f4bf6cd09d0ec7221ef621 /lib | |
| parent | 2b9620e6af80a1ce57321bc32d126b602ca493ce (diff) | |
| download | emacs-21d10e59f89a5bb72829ffb8ebe4463ba4fac124.tar.gz emacs-21d10e59f89a5bb72829ffb8ebe4463ba4fac124.zip | |
Pacify clang without munging C source
* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/strftime.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/strftime.c b/lib/strftime.c index 18c899d2117..99bee4ef978 100644 --- a/lib/strftime.c +++ b/lib/strftime.c | |||
| @@ -1123,23 +1123,18 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1123 | if (modifier == L_('E')) | 1123 | if (modifier == L_('E')) |
| 1124 | goto bad_format; | 1124 | goto bad_format; |
| 1125 | 1125 | ||
| 1126 | { | 1126 | number_value = ns; |
| 1127 | /* Use a new variable here instead of reusing number_value | 1127 | if (width == -1) |
| 1128 | because Clang complains about the self-assignment | 1128 | width = 9; |
| 1129 | generated by DO_NUMBER. */ | 1129 | else |
| 1130 | ptrdiff_t n = ns; | 1130 | { |
| 1131 | if (width == -1) | 1131 | /* Take an explicit width less than 9 as a precision. */ |
| 1132 | width = 9; | 1132 | int j; |
| 1133 | else | 1133 | for (j = width; j < 9; j++) |
| 1134 | { | 1134 | number_value /= 10; |
| 1135 | /* Take an explicit width less than 9 as a precision. */ | 1135 | } |
| 1136 | int j; | ||
| 1137 | for (j = width; j < 9; j++) | ||
| 1138 | n /= 10; | ||
| 1139 | } | ||
| 1140 | 1136 | ||
| 1141 | DO_NUMBER (width, n); | 1137 | DO_NUMBER (width, number_value); |
| 1142 | } | ||
| 1143 | #endif | 1138 | #endif |
| 1144 | 1139 | ||
| 1145 | case L_('n'): | 1140 | case L_('n'): |