diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-20 20:55:03 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-20 20:55:03 (GMT) |
commit | fc36f531155510f397c96f8d5b6e3a69cbb8a341 (patch) | |
tree | 3a82450934b4fd603d809dbdd9ffdc8b31eac5f0 | |
parent | 752af2134f0083b24bd50f2ca380cfa588fd737d (diff) | |
download | hdf5-fc36f531155510f397c96f8d5b6e3a69cbb8a341.zip hdf5-fc36f531155510f397c96f8d5b6e3a69cbb8a341.tar.gz hdf5-fc36f531155510f397c96f8d5b6e3a69cbb8a341.tar.bz2 |
Quiet some used-before-initialized warnings and, while I am here,
initialize one variable with a named constant instead of -1.
-rw-r--r-- | test/vfd_swmr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 755788b..72d1581 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -1948,7 +1948,7 @@ error: static unsigned test_multiple_concur_file_opens(void) { - hid_t fcpl = -1; /* File creation property list */ + hid_t fcpl = H5I_INVALID_HID; pid_t tmppid; /* Child process ID returned by waitpid */ pid_t childpid = 0; /* Child process ID */ int child_status; /* Status passed to waitpid */ @@ -1957,8 +1957,8 @@ test_multiple_concur_file_opens(void) int parent_pfd[2]; /* Pipe for parent process as writer */ int child_pfd[2]; /* Pipe for child process as reader */ int notify = 0; /* Notification between parent and child */ - hid_t fid1, fid2; /* File IDs */ - hid_t fapl1, fapl2; /* File access property list */ + hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; + hid_t fapl1 = H5I_INVALID_HID, fapl2 = H5I_INVALID_HID; H5F_vfd_swmr_config_t *config1 = NULL; /* VFD SWMR configuration */ H5F_vfd_swmr_config_t *config2 = NULL; /* VFD SWMR configuration */ H5F_t *f1, *f2; /* File pointer */ |