Avoid compiler warnings due to ignored write return values
authorDirk-Jan C. Binnema <djcb.bulk@gmail.com>
Mon, 23 Nov 2009 06:03:35 +0000 (08:03 +0200)
committerCarl Worth <cworth@cworth.org>
Tue, 1 Dec 2009 15:50:35 +0000 (07:50 -0800)
commit5f0b2ece161b16321792d9ff2f76bcc33a3b6b42
tree68a47643c827ff65865f309dd33c2c1878b1ebde
parent55559ea409ad8df367f13752430244b7087dcd23
Avoid compiler warnings due to ignored write return values

Glibc (at least) provides the warn_unused_result attribute on write,
(if optimizing and _FORTIFY_SOURCE is defined). So we explicitly
ignore the return value in our signal handler, where we couldn't do
anything anyway.

Compile with:

make CFLAGS="-O -D_FORTIFY_SOURCE"

before this commit to see the warning.
notmuch-new.c
notmuch-tag.c