Skip to content

Commit 5b355b1

Browse files
Fix COPY_PASTE_ERROR
This was not a real copy paste error. We intended to have the code do what we indicated. So, our two options were to tell Coverity to ignore this line of code, or change the code slightly so Coverity doesn't recognize it as a copy-paste error. We chose to do the latter. Fixes: test/acl_event_test.cpp:918:9: Type: Copy-paste error (COPY_PASTE_ERROR) test/acl_event_test.cpp:914:9: original: "submit_times[i]" looks like the original copy. test/acl_event_test.cpp:918:9: copy_paste_error: "submit_times" in "submit_times[i]" looks like a copy-paste error. test/acl_event_test.cpp:918:9: remediation: Should it say "end_times" instead? a
1 parent 5f387d6 commit 5b355b1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/acl_event_test.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <acl_util.h>
2525
#include <unref.h>
2626

27+
#include <inttypes.h>
28+
2729
#include "acl_test.h"
2830

2931
MT_TEST_GROUP(acl_event) {
@@ -899,8 +901,9 @@ MT_TEST(acl_event_default_config, event_dependency_exec_order) {
899901
// Internally consistent event profile.
900902
// Recall the example HAL bumps up the timestamp on every call.
901903
CHECK(queued_times[i] < submit_times[i]);
902-
acl_print_debug_msg(" Event[%d] times = { %lu %lu %lu %lu }\n", i,
903-
queued_times[i], submit_times[i], start_times[i],
904+
acl_print_debug_msg(" Event[%d] times = { %" PRIu64 " %" PRIu64
905+
" %" PRIu64 " %" PRIu64 " }\n",
906+
i, queued_times[i], submit_times[i], start_times[i],
904907
end_times[i]);
905908
CHECK(submit_times[i] < start_times[i]);
906909
CHECK(start_times[i] < end_times[i]);
@@ -915,7 +918,7 @@ MT_TEST(acl_event_default_config, event_dependency_exec_order) {
915918

916919
// Check separation between dependent events.
917920
// That is, they actually waited for the prior events.
918-
CHECK(end_times[i - 1] < submit_times[i]);
921+
CHECK(submit_times[i] > end_times[i - 1]);
919922
}
920923
}
921924

0 commit comments

Comments
 (0)