]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Tests: Fix a compiler warning with _FORTIFY_SOURCE.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 10 Jan 2012 15:13:03 +0000 (17:13 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 24 May 2012 15:24:44 +0000 (18:24 +0300)
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385

tests/create_compress_files.c

index 44367d8f18eca5fd28cf18fdd2df9b9938a2a6fc..bd5b4ef40d404dcc8de747e59bb6b149bdcc5580 100644 (file)
@@ -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);
 }