* lib/strftime.c (libc_hidden_def):
* lib-src/make-docfile.c (put_filename): Introduce local variables to
silence Clang warnings.
for (tmp = filename; *tmp; tmp++)
{
- if (IS_DIRECTORY_SEP (*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)
filename = tmp + 1;
}
if (modifier == L_('E'))
goto bad_format;
- 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;
- }
+ {
+ /* 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;
+ }
- DO_NUMBER (width, number_value);
+ DO_NUMBER (width, n);
+ }
#endif
case L_('n'):