summaryrefslogtreecommitdiffstats
path: root/tools/test/h5import/h5importtest.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-04-27 15:51:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-04-27 15:51:58 (GMT)
commit9a598477c6ccecef8e43dbda6b6828b9fcac8df6 (patch)
treed86b6cc76c01f4d47f3fc542589ec4666ca1e614 /tools/test/h5import/h5importtest.c
parentf3d23046473916d497bdf7d14381e3ef24122882 (diff)
parentc03ee563f46013d22f36a1895664a9ba876558e9 (diff)
downloadhdf5-9a598477c6ccecef8e43dbda6b6828b9fcac8df6.zip
hdf5-9a598477c6ccecef8e43dbda6b6828b9fcac8df6.tar.gz
hdf5-9a598477c6ccecef8e43dbda6b6828b9fcac8df6.tar.bz2
Merge pull request #2541 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'c03ee563f46013d22f36a1895664a9ba876558e9': Further updates to the tools warnings fixes from code review. Updates to tools warning PR from code review. Fixes for warnings in the tools code.
Diffstat (limited to 'tools/test/h5import/h5importtest.c')
-rw-r--r--tools/test/h5import/h5importtest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index 560f1b3..580530a 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -68,13 +68,12 @@ main(void)
double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F;
/* Initialize machine endian */
- volatile uint32_t ibyte=0x01234567;
+ volatile uint32_t ibyte = 0x01234567;
/* 0 for big endian, 1 for little endian. */
- if ((*((uint8_t*)(&ibyte))) == 0x67)
- HDstrncpy(machine_order, "LE", 2);
+ if ((*((volatile uint8_t *)(&ibyte))) == 0x67)
+ HDstrcpy(machine_order, "LE");
else
- HDstrncpy(machine_order, "BE", 2);
-
+ HDstrcpy(machine_order, "BE");
/*
* initialize the row, column, and plane vectors