diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-10 18:42:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 18:42:35 (GMT) |
commit | d7b40604ef43c0617ba93369983657d77d9e976a (patch) | |
tree | ae6eef7cd8a34f3667b585ca37c290fb0cc97fce /test/mount.c | |
parent | a7a013782f0af93f511142b5d167c2bc8ca8505d (diff) | |
download | hdf5-d7b40604ef43c0617ba93369983657d77d9e976a.zip hdf5-d7b40604ef43c0617ba93369983657d77d9e976a.tar.gz hdf5-d7b40604ef43c0617ba93369983657d77d9e976a.tar.bz2 |
Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
* Fixed all clang-tidy bugprone-suspicious-string-compare warnings
This change was generated entirely by clang-tidy itself.
* Reformat code with clang v10.0.1.
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'test/mount.c')
-rw-r--r-- | test/mount.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/test/mount.c b/test/mount.c index 94d372e..1ed8f58 100644 --- a/test/mount.c +++ b/test/mount.c @@ -1547,7 +1547,7 @@ test_mount_after_close(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/A/B/M/X")) + if (HDstrcmp(objname, "/A/B/M/X") != 0) TEST_ERROR /* Close object in mounted file */ @@ -1562,7 +1562,7 @@ test_mount_after_close(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/A/B/C")) + if (HDstrcmp(objname, "/A/B/C") != 0) TEST_ERROR /* Close object in mounted file */ @@ -1577,7 +1577,7 @@ test_mount_after_close(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/A/B/T")) + if (HDstrcmp(objname, "/A/B/T") != 0) TEST_ERROR /* Close object in original file */ @@ -1592,7 +1592,7 @@ test_mount_after_close(hid_t fapl) *objname = '\0'; if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/A/B/M/X/Y/D")) + if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0) TEST_ERROR /* Close object in mounted file */ @@ -1765,7 +1765,7 @@ test_mount_after_unmount(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/M/X/X")) + if (HDstrcmp(objname, "/A/M/X/X") != 0) TEST_ERROR /* Open group in mounted file #2 */ @@ -1785,7 +1785,7 @@ test_mount_after_unmount(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/M/X/M/Y")) + if (HDstrcmp(objname, "/A/M/X/M/Y") != 0) TEST_ERROR /* Unmount second file */ @@ -1796,7 +1796,7 @@ test_mount_after_unmount(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/X/M/Y")) + if (HDstrcmp(objname, "/X/M/Y") != 0) TEST_ERROR /* Rename object in file #3 that is "disconnected" from name hiearchy */ @@ -1816,7 +1816,7 @@ test_mount_after_unmount(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/X/M/Z")) + if (HDstrcmp(objname, "/X/M/Z") != 0) TEST_ERROR /* Mount fourth file */ @@ -1832,7 +1832,7 @@ test_mount_after_unmount(hid_t fapl) *objname = '\0'; if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/B/M/Z")) + if (HDstrcmp(objname, "/B/M/Z") != 0) TEST_ERROR /* Unmount third file */ @@ -3080,7 +3080,7 @@ test_mult_mount(hid_t fapl) *name = '\0'; if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(name, "/A/M/T")) + if (HDstrcmp(name, "/A/M/T") != 0) TEST_ERROR /* Create object in file #3 */ @@ -3098,7 +3098,7 @@ test_mult_mount(hid_t fapl) *name = '\0'; if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(name, "/B/S")) + if (HDstrcmp(name, "/B/S") != 0) TEST_ERROR /* Re-open object created in file #3 through file #1 mount path */ @@ -3279,7 +3279,7 @@ test_nested_survive(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/A/M")) + if (name_len == 0 || HDstrcmp(name, "/A/M") != 0) TEST_ERROR /* Unmount file #2 from file #1 */ @@ -3290,7 +3290,7 @@ test_nested_survive(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len != 0 || HDstrcmp(name, "")) + if (name_len != 0 || HDstrcmp(name, "") != 0) TEST_ERROR /* Open object in file #3 through file #1 mount path (should fail) */ @@ -3307,7 +3307,7 @@ test_nested_survive(hid_t fapl) *name = '\0'; if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(name, "/M/S")) + if (HDstrcmp(name, "/M/S") != 0) TEST_ERROR /* Close group in file #3 */ @@ -3326,7 +3326,7 @@ test_nested_survive(hid_t fapl) *name = '\0'; if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(name, "/A/M/S")) + if (HDstrcmp(name, "/A/M/S") != 0) TEST_ERROR /* Close group in file #3 */ @@ -3475,7 +3475,7 @@ test_close_parent(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/A/M")) + if (name_len == 0 || HDstrcmp(name, "/A/M") != 0) TEST_ERROR /* Unmount file #2 from file #1, closing file #1 */ @@ -3486,7 +3486,7 @@ test_close_parent(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/M")) + if (name_len == 0 || HDstrcmp(name, "/M") != 0) TEST_ERROR /* Just file #2's underlying shared file should be open still */ @@ -3753,7 +3753,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/A/E/M")) + if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0) TEST_ERROR /* Open object in file #7 */ @@ -3764,7 +3764,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/B/I/Q")) + if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0) TEST_ERROR /* Close file #1 */ @@ -3821,7 +3821,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/D/K")) + if (name_len == 0 || HDstrcmp(name, "/D/K") != 0) TEST_ERROR if (H5Gclose(gidK) < 0) @@ -3841,7 +3841,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/B/H/O")) + if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0) TEST_ERROR if (H5Gclose(gidO) < 0) @@ -3851,14 +3851,14 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/E/M")) + if (name_len == 0 || HDstrcmp(name, "/E/M") != 0) TEST_ERROR /* Check the name of "Q" is still defined */ *name = '\0'; if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/B/I/Q")) + if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0) TEST_ERROR /* Check that all seven underlying files are still opened */ @@ -3883,7 +3883,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/I/Q")) + if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0) TEST_ERROR /* Open object in file #6 from file #7 */ @@ -3894,7 +3894,7 @@ test_cut_graph(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/H/O")) + if (name_len == 0 || HDstrcmp(name, "/H/O") != 0) TEST_ERROR if (H5Gclose(gidO) < 0) @@ -4060,7 +4060,7 @@ test_symlink(hid_t fapl) *name = '\0'; if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0) TEST_ERROR - if (name_len == 0 || HDstrcmp(name, "/L")) + if (name_len == 0 || HDstrcmp(name, "/L") != 0) TEST_ERROR /* Close file #1 */ |