From: Lasse Collin Date: Tue, 10 Jan 2012 15:13:03 +0000 (+0200) Subject: Tests: Fix a compiler warning with _FORTIFY_SOURCE. X-Git-Tag: v5.0.4~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfac2be5023994fcc53de2844e7dd3af61910dc2;p=thirdparty%2Fxz.git Tests: Fix a compiler warning with _FORTIFY_SOURCE. Reported here: http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385 --- diff --git a/tests/create_compress_files.c b/tests/create_compress_files.c index 44367d8f..bd5b4ef4 100644 --- a/tests/create_compress_files.c +++ b/tests/create_compress_files.c @@ -79,7 +79,8 @@ static void write_abc(FILE *file) { for (size_t i = 0; i < 12345; ++i) - fwrite("abc\n", 4, 1, file); + if (fwrite("abc\n", 4, 1, file) != 1) + exit(1); }