diff options
author | Lisa Nguyen <lisa.nguyen@linaro.org> | 2015-10-22 02:41:52 -0700 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2015-11-18 13:32:24 -0800 |
commit | 1b8a39c5d443feffe4c34cf15b1b21ea0b957bf0 (patch) | |
tree | 7a1a0e46045550422b7f9a5cff4a2efc063dff32 | |
parent | 9224192db7ef427e53106558cdb2871ee1565a1c (diff) |
heat_cpu: Resolve the data format warning
Change the printf formats to resolve the following warnings:
heat_cpu.c: In function ‘main’:
heat_cpu.c:160:4: warning: format ‘%i’ expects argument of type ‘int’,
but argument 2 has type ‘long int’ [-Wformat=]
printf("i: %i\n", i);
heat_cpu.c:174:4: warning: format ‘%d’ expects argument of type ‘int’,
but argument 2 has type ‘long int’ [-Wformat=]
printf("Error pthread_create failed for cpu%d\n", i);
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
-rw-r--r-- | utils/heat_cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/heat_cpu.c b/utils/heat_cpu.c index 677e8bb..782a943 100644 --- a/utils/heat_cpu.c +++ b/utils/heat_cpu.c @@ -157,7 +157,7 @@ int main(int arg_count, char *argv[]) if (ret) { printf("Error setting affinity on pthread attribute\n"); - printf("i: %i\n", i); + printf("i: %li\n", i); printf("Error: %s\n", strerror(ret)); return ret; } @@ -171,7 +171,7 @@ int main(int arg_count, char *argv[]) ret = pthread_create(&p_thread_ptr[i], &p[i], do_loop, (void *)i); if (ret < 0) - printf("Error pthread_create failed for cpu%d\n", i); + printf("Error pthread_create failed for cpu%ld\n", i); #ifdef ANDROID CPU_ZERO(&cpuset); |