diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-12-11 14:23:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-11 14:23:06 +0200 |
commit | 6632bbd75402f821bcc365110899d6f8db7e5e3f (patch) | |
tree | 89059df6c22ee14ba223a193598a0375d2cfb443 | |
parent | 594e6f11190cea1de1d9b9f6b255753689ba5aeb (diff) | |
parent | b68fe499dd476b1f97dd1400a768d58985a9cd6f (diff) |
Merge pull request #1352 from ktsaou/master
settle compiler warnings about signed and unsigned comparisons
-rw-r--r-- | src/proc_interrupts.c | 4 | ||||
-rw-r--r-- | src/proc_softirqs.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/proc_interrupts.c b/src/proc_interrupts.c index 72f16a6c7e..fd10044c76 100644 --- a/src/proc_interrupts.c +++ b/src/proc_interrupts.c @@ -23,9 +23,9 @@ struct interrupt { // given a base, get a pointer to each record #define irrindex(base, line, cpus) ((struct interrupt *)&((char *)(base))[line * recordsize(cpus)]) -static inline struct interrupt *get_interrupts_array(int lines, int cpus) { +static inline struct interrupt *get_interrupts_array(uint32_t lines, int cpus) { static struct interrupt *irrs = NULL; - static int allocated = 0; + static uint32_t allocated = 0; if(unlikely(lines != allocated)) { uint32_t l; diff --git a/src/proc_softirqs.c b/src/proc_softirqs.c index 069e83ce19..482dc461a9 100644 --- a/src/proc_softirqs.c +++ b/src/proc_softirqs.c @@ -23,9 +23,9 @@ struct interrupt { // given a base, get a pointer to each record #define irrindex(base, line, cpus) ((struct interrupt *)&((char *)(base))[line * recordsize(cpus)]) -static inline struct interrupt *get_interrupts_array(int lines, int cpus) { +static inline struct interrupt *get_interrupts_array(uint32_t lines, int cpus) { static struct interrupt *irrs = NULL; - static int allocated = 0; + static uint32_t allocated = 0; if(unlikely(lines != allocated)) { uint32_t l; |