diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 85bcc8b..9470bd6 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -224,11 +224,7 @@ put_filename (char *filename) for (tmp = filename; *tmp; tmp++) { - /* Use separate variable to silence a Clang warning on macOS. - Clang takes offence of the additional set of parantheses - generated by the macro. */ - bool is_sep = IS_DIRECTORY_SEP (*tmp); - if (is_sep) + if (IS_DIRECTORY_SEP (*tmp)) filename = tmp + 1; } diff --git a/lib/strftime.c b/lib/strftime.c index 18c899d..99bee4e 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) if (modifier == L_('E')) goto bad_format; - { - /* Use a new variable here instead of reusing number_value - because Clang complains about the self-assignment - generated by DO_NUMBER. */ - ptrdiff_t n = ns; - if (width == -1) - width = 9; - else - { - /* Take an explicit width less than 9 as a precision. */ - int j; - for (j = width; j < 9; j++) - n /= 10; - } + number_value = ns; + if (width == -1) + width = 9; + else + { + /* Take an explicit width less than 9 as a precision. */ + int j; + for (j = width; j < 9; j++) + number_value /= 10; + } - DO_NUMBER (width, n); - } + DO_NUMBER (width, number_value); #endif case L_('n'): diff --git a/src/emacs.c b/src/emacs.c index 08430de..da8df1b 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -832,7 +832,7 @@ main (int argc, char **argv) (https://www.cygwin.com/ml/cygwin/2015-07/msg00096.html). */ struct rlimit rlim; if (getrlimit (RLIMIT_STACK, &rlim) == 0 - && rlim.rlim_cur <= LONG_MAX) + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= LONG_MAX) { rlim_t lim = rlim.rlim_cur; @@ -866,7 +866,7 @@ main (int argc, char **argv) right thing anyway. */ long pagesize = getpagesize (); newlim += pagesize - 1; - if (rlim.rlim_max < newlim) + if (0 <= rlim.rlim_max && rlim.rlim_max < newlim) newlim = rlim.rlim_max; newlim -= newlim % pagesize;