Skip to content

Commit 6635c79

Browse files
IlanTruanovskypcolberg
authored andcommitted
Fix PRINTF_ARGS Coverity issues
Fixes: test/acl_event_test.cpp:903:27: Type: Invalid type in argument to printf format specifier (PRINTF_ARGS) test/acl_event_test.cpp:903:27: invalid_type: Argument "queued_times[i]" to format specifier "%d" was expected to have type "int" but has type "unsigned long". src/acl_hal.cpp:123:3: path: Condition "debug_mode > 0", taking true branch. src/acl_hal.cpp:126:5: printf_function: Calling "vprintf" which uses a "printf"-style format string. [Note: The source code implementation of the function has been overridden by a builtin model.] test/acl_event_test.cpp:903:44: Type: Invalid type in argument to printf format specifier (PRINTF_ARGS) test/acl_event_test.cpp:903:44: invalid_type: Argument "submit_times[i]" to format specifier "%d" was expected to have type "int" but has type "unsigned long". src/acl_hal.cpp:123:3: path: Condition "debug_mode > 0", taking true branch. src/acl_hal.cpp:126:5: printf_function: Calling "vprintf" which uses a "printf"-style format string. [Note: The source code implementation of the function has been overridden by a builtin model.] test/acl_event_test.cpp:903:61: Type: Invalid type in argument to printf format specifier (PRINTF_ARGS) test/acl_event_test.cpp:903:61: invalid_type: Argument "start_times[i]" to format specifier "%d" was expected to have type "int" but has type "unsigned long". src/acl_hal.cpp:123:3: path: Condition "debug_mode > 0", taking true branch. src/acl_hal.cpp:126:5: printf_function: Calling "vprintf" which uses a "printf"-style format string. [Note: The source code implementation of the function has been overridden by a builtin model.] test/acl_event_test.cpp:904:27: Type: Invalid type in argument to printf format specifier (PRINTF_ARGS) test/acl_event_test.cpp:904:27: invalid_type: Argument "end_times[i]" to format specifier "%d" was expected to have type "int" but has type "unsigned long". src/acl_hal.cpp:123:3: path: Condition "debug_mode > 0", taking true branch. src/acl_hal.cpp:126:5: printf_function: Calling "vprintf" which uses a "printf"-style format string. [Note: The source code implementation of the function has been overridden by a builtin model.]
1 parent 5a71e64 commit 6635c79

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/acl_event_test.cpp

Lines changed: 5 additions & 2 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 = { %d %d %d %d }\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]);

0 commit comments

Comments
 (0)