From e61ed09aab3b6c97e71948ad7a7eeee12d2b89fc Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 29 Jul 2016 21:02:10 -0500 Subject: [svn-r30228] Changed a few printf calls to HDprintf in file_image.c. Checked the return value of a read() call to clean up a warning. Tested on: 64-bit Ubuntu Linux 16.04 LTS w/ gcc 5.4.0 Autotools serial, file_image test only --- test/file_image.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/file_image.c b/test/file_image.c index e901fa4..dd0a483 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -632,7 +632,8 @@ test_core(void) VERIFY(ret == 0, "fstat failed"); size = (size_t)sb.st_size; file_image = (unsigned char *)HDmalloc(size); - HDread(fd, file_image, size); + if(HDread(fd, file_image, size) < 0) + FAIL_PUTS_ERROR("unable to read from file descriptor"); ret = HDclose(fd); VERIFY(ret == 0, "close failed"); @@ -1318,7 +1319,7 @@ main(void) h5_reset(); - printf("Testing File Image Functionality.\n"); + HDprintf("Testing File Image Functionality.\n"); errors += test_properties(); errors += test_callbacks(); @@ -1379,12 +1380,12 @@ main(void) h5_restore_err(); if(errors) { - printf("***** %d File Image TEST%s FAILED! *****\n", + HDprintf("***** %d File Image TEST%s FAILED! *****\n", errors, errors > 1 ? "S" : ""); return 1; } - printf("All File Image tests passed.\n"); + HDprintf("All File Image tests passed.\n"); return 0; } -- cgit v0.12