osx: fix remaining compiler warnings
Signed-off-by: Žilvinas Valinskas <zilvinas.valinskas@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
committed by
Thomas Graf
parent
852008c4ae
commit
ee98b9ea30
@ -8,6 +8,14 @@
|
|||||||
#ifndef BMON_LIST_H_
|
#ifndef BMON_LIST_H_
|
||||||
#define BMON_LIST_H_
|
#define BMON_LIST_H_
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
/* Apple systems define these macros in system headers, so we undef
|
||||||
|
* them prior to inclusion of this file */
|
||||||
|
#undef LIST_HEAD
|
||||||
|
#undef LIST_HEAD_INIT
|
||||||
|
#undef INIT_LIST_HEAD
|
||||||
|
#endif
|
||||||
|
|
||||||
struct list_head
|
struct list_head
|
||||||
{
|
{
|
||||||
struct list_head * next;
|
struct list_head * next;
|
||||||
|
@ -115,6 +115,7 @@ int module_register(struct bmon_subsys *ss, struct bmon_module *m)
|
|||||||
|
|
||||||
list_add_tail(&m->m_list, &ss->s_mod_list);
|
list_add_tail(&m->m_list, &ss->s_mod_list);
|
||||||
m->m_subsys = ss;
|
m->m_subsys = ss;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __auto_load(struct bmon_module *m)
|
static void __auto_load(struct bmon_module *m)
|
||||||
|
@ -126,10 +126,10 @@ static char *get_token(struct element_group *g, struct element *e,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!strncasecmp(type, "rx:", 3)) {
|
if (!strncasecmp(type, "rx:", 3)) {
|
||||||
snprintf(buf, len, "%lu", a->a_rx_rate.r_total);
|
snprintf(buf, len, "%llu", a->a_rx_rate.r_total);
|
||||||
return buf;
|
return buf;
|
||||||
} else if (!strncasecmp(type, "tx:", 3)) {
|
} else if (!strncasecmp(type, "tx:", 3)) {
|
||||||
snprintf(buf, len, "%lu", a->a_tx_rate.r_total);
|
snprintf(buf, len, "%llu", a->a_tx_rate.r_total);
|
||||||
return buf;
|
return buf;
|
||||||
} else if (!strncasecmp(type, "rxrate:", 7)) {
|
} else if (!strncasecmp(type, "rxrate:", 7)) {
|
||||||
snprintf(buf, len, "%.2f", a->a_rx_rate.r_rate);
|
snprintf(buf, len, "%.2f", a->a_rx_rate.r_rate);
|
||||||
|
Reference in New Issue
Block a user