From: Ruben Kerkhof Date: Sun, 14 Aug 2016 18:53:33 +0000 (+0200) Subject: cpu plugin: fix compiler warning on OS X X-Git-Tag: collectd-5.6.0~26^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=03c308c99caa9e5d088487fcda27cc756ffd6b1c;p=collectd.git cpu plugin: fix compiler warning on OS X cpu.c:593:24: warning: comparison of integers of different signs: 'int' and 'mach_msg_type_number_t' (aka 'unsigned int') [-Wsign-compare] for (int cpu = 0; cpu < cpu_list_len; cpu++) ~~~ ^ ~~~~~~~~~~~~ --- diff --git a/src/cpu.c b/src/cpu.c index c8566059..1ac5b4a3 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -590,7 +590,7 @@ static int cpu_read (void) host_t cpu_host; - for (int cpu = 0; cpu < cpu_list_len; cpu++) + for (mach_msg_type_number_t cpu = 0; cpu < cpu_list_len; cpu++) { cpu_host = 0; cpu_info_len = PROCESSOR_BASIC_INFO_COUNT;