Skip to content

Commit fa5ba24

Browse files
committed
address cppcheck warnings
Change-Id: I1ee5fe9d4056c30659aaadfcbe1880552315852a
1 parent 8fc06bf commit fa5ba24

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/c_example.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ int main(int argc, const char *argv[])
108108

109109
lcore_id = pcm_getcpu();
110110
printf("C:%llu I:%llu, IPC:%3.2f\n",
111-
PCM.pcm_c_get_cycles(lcore_id),
112-
PCM.pcm_c_get_instr(lcore_id),
111+
(unsigned long long)PCM.pcm_c_get_cycles(lcore_id),
112+
(unsigned long long)PCM.pcm_c_get_instr(lcore_id),
113113
(double)PCM.pcm_c_get_instr(lcore_id)/PCM.pcm_c_get_cycles(lcore_id));
114114
printf("CPU%d E0: %llu, E1: %llu, E2: %llu, E3: %llu\n",
115115
lcore_id,
116-
PCM.pcm_c_get_core_event(lcore_id,0),
117-
PCM.pcm_c_get_core_event(lcore_id,1),
118-
PCM.pcm_c_get_core_event(lcore_id,2),
119-
PCM.pcm_c_get_core_event(lcore_id,3));
116+
(unsigned long long)PCM.pcm_c_get_core_event(lcore_id,0),
117+
(unsigned long long)PCM.pcm_c_get_core_event(lcore_id,1),
118+
(unsigned long long)PCM.pcm_c_get_core_event(lcore_id,2),
119+
(unsigned long long)PCM.pcm_c_get_core_event(lcore_id,3));
120120

121121
return 0;
122122
}

tests/daemon_alignment_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void checkAlignment(char const * debugMessage, void* ptr)
1414
if(currentAlignment != 0)
1515
{
1616
printf("Failed\n");
17-
printf("Current alignment: %llu\n\n", currentAlignment);
17+
printf("Current alignment: %llu\n\n", (unsigned long long)currentAlignment);
1818
exit(EXIT_FAILURE);
1919
}
2020
else

0 commit comments

Comments
 (0)