From: Bruno Haible Date: Sun, 16 Aug 2020 11:00:57 +0000 (+0200) Subject: Fix "warning: format specifies type 'unsigned long'". X-Git-Tag: v1.0~3738 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3726823d042c8010390797d6a46e002dac783086;p=gnulib.git Fix "warning: format specifies type 'unsigned long'". * tests/test-nonblocking-writer.h (main_writer_loop): Cast dbgfprintf argument to match the format directive. --- diff --git a/ChangeLog b/ChangeLog index d2b2277e56..c939272763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-08-16 Bruno Haible + Fix "warning: format specifies type 'unsigned long'". + * tests/test-nonblocking-writer.h (main_writer_loop): Cast dbgfprintf + argument to match the format directive. + Fix "warning: no case matching constant switch condition '0'". * tests/test-fcntl.c (check_flags): Add a 'default' case. diff --git a/tests/test-nonblocking-writer.h b/tests/test-nonblocking-writer.h index d579980392..0cb491170b 100644 --- a/tests/test-nonblocking-writer.h +++ b/tests/test-nonblocking-writer.h @@ -79,7 +79,7 @@ main_writer_loop (int test, size_t data_block_size, int fd, usleep (1000000); dbgfprintf (stderr, "%s:1: >> write (%lu)\n", PROG_ROLE, - (unsigned long) 2 * data_block_size); + (unsigned long) (2 * data_block_size)); START_TIMING ret = write (fd, data, 2 * data_block_size); saved_errno = errno;