Disable -Wdiv-by-zero for some tests in stdio-common/tst-unlockedio.c.
commitc81e9deba2f73ddc6f62a9d41684824c854366c6
authorJoseph Myers <joseph@codesourcery.com>
Wed, 10 Dec 2014 00:43:36 +0000 (10 00:43 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 10 Dec 2014 00:43:36 +0000 (10 00:43 +0000)
tree299afb1952fcd068b405612940a968d354aaaf2d
parent2084e7ca4d344c39eb39e53848b51b5d84444414
Disable -Wdiv-by-zero for some tests in stdio-common/tst-unlockedio.c.

This patch uses diagnostic control pragmas to disable some
division-by-zero warnings in stdio-common/tst-unlockedio.c.  This is
another test where disabling warnings using diagnostic pragmas seems
appropriate (the warnings are not wildly inappropriate for what the
test deliberately does; the deliberate use of unusual arguments to the
macros being tested means that changing the arguments in a way that
avoids the warning would also unduly perturb what is being tested).

Tested for x86_64.

* stdio-common/tst-unlockedio.c: Include <libc-internal.h>.
(do_test): Disable -Wdiv-by-zero around some calls to
fwrite_unlocked and fread_unlocked.
ChangeLog
stdio-common/tst-unlockedio.c