summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-07-30 02:02:10 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-07-30 02:02:10 (GMT)
commite61ed09aab3b6c97e71948ad7a7eeee12d2b89fc (patch)
tree50ebe6384f1c9df1e96c92679b7ea11b1287f593 /test
parentfaea627254f89a8d2209ddf04870ed4b9def47f8 (diff)
downloadhdf5-e61ed09aab3b6c97e71948ad7a7eeee12d2b89fc.zip
hdf5-e61ed09aab3b6c97e71948ad7a7eeee12d2b89fc.tar.gz
hdf5-e61ed09aab3b6c97e71948ad7a7eeee12d2b89fc.tar.bz2
[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
Diffstat (limited to 'test')
-rw-r--r--test/file_image.c9
1 files 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;
}