From 7e7e87600e4a8e826e39ced94432582007a8ee0a Mon Sep 17 00:00:00 2001 From: TingPing Date: Sat, 21 Feb 2015 21:01:14 -0500 Subject: More type issues/warnings --- plugins/sysinfo/shared/df.c | 2 +- plugins/sysinfo/unix/parse.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/sysinfo/shared/df.c b/plugins/sysinfo/shared/df.c index 2ef75689..ce0760a6 100644 --- a/plugins/sysinfo/shared/df.c +++ b/plugins/sysinfo/shared/df.c @@ -37,7 +37,7 @@ int xs_parse_df(gint64 *out_total, gint64 *out_free) long long int avail, total; /* Filesystem 1024-blocks Used Available Capacity Mounted-on */ - if (sscanf (buffer, "%*s %lld %*lld %lld %*s %*s", &total, &avail) == 2) + if (sscanf (buffer, "%*s %lld %*s %lld %*s %*s", &total, &avail) == 2) { *out_total += total; *out_free += avail; diff --git a/plugins/sysinfo/unix/parse.c b/plugins/sysinfo/unix/parse.c index 0ca140de..f41f89a7 100644 --- a/plugins/sysinfo/unix/parse.c +++ b/plugins/sysinfo/unix/parse.c @@ -116,7 +116,7 @@ gint64 xs_parse_uptime(void) return 0; if(fgets(buffer, bsize, fp) != NULL) - uptime = strtol(buffer, NULL, 0); + uptime = g_ascii_strtoll(buffer, NULL, 0); fclose(fp); @@ -146,13 +146,13 @@ int xs_parse_sound(char *snd_card) if(isdigit(buffer[0]) || isdigit(buffer[1])) { char card_buf[bsize]; - long card_id = 0; + gint64 card_id = 0; pos = strstr(buffer, ":"); - card_id = strtoll(buffer, NULL, 0); + card_id = g_ascii_strtoll(buffer, NULL, 0); if (card_id == 0) g_snprintf(card_buf, bsize, "%s", pos+2); else - g_snprintf(card_buf, bsize, "%ld: %s", card_id, pos+2); + g_snprintf(card_buf, bsize, "%"G_GINT64_FORMAT": %s", card_id, pos+2); pos = strstr(card_buf, "\n"); *pos = '\0'; strcat(cards, card_buf); -- cgit 1.4.1