[Pkg-wmaker-commits] [wmmon] 34/38: wmmon: Use consistent data types.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Aug 12 22:43:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmmon.
commit 5b5cf601721d04e42f83a49fdf26fe9d1e0fc6c0
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Sat Aug 12 15:06:37 2017 -0400
wmmon: Use consistent data types.
---
wmmon-mask.xbm | 2 +-
wmmon.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/wmmon-mask.xbm b/wmmon-mask.xbm
index 43b85a4..3d67e53 100644
--- a/wmmon-mask.xbm
+++ b/wmmon-mask.xbm
@@ -1,6 +1,6 @@
#define wmmon_mask_width 128
#define wmmon_mask_height 64
-static char wmmon_mask_bits[] = {
+static unsigned char wmmon_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/wmmon.c b/wmmon.c
index 4e7a125..385de13 100644
--- a/wmmon.c
+++ b/wmmon.c
@@ -232,7 +232,7 @@ void wmmon_routine(int argc, char **argv)
{ NULL, NULL }
};
- unsigned long i, j;
+ int i, j;
long k;
XEvent Event;
int but_stat = -1;
@@ -325,7 +325,7 @@ void wmmon_routine(int argc, char **argv)
exit(1);
}
- openXwindow(argc, argv, wmmon_master_xpm, wmmon_mask_bits,
+ openXwindow(argc, argv, wmmon_master_xpm, (char *)wmmon_mask_bits,
wmmon_mask_width, wmmon_mask_height);
/* add mouse region */
@@ -678,17 +678,17 @@ void update_stat_mem(stat_dev *st, stat_dev *st2)
if (strstr(line, "MemTotal:"))
sscanf(line, "MemTotal: %ld", &st->rt_idle);
else if (strstr(line, "MemFree:"))
- sscanf(line, "MemFree: %ld", &free);
+ sscanf(line, "MemFree: %lu", &free);
else if (strstr(line, "MemShared:"))
- sscanf(line, "MemShared: %ld", &shared);
+ sscanf(line, "MemShared: %lu", &shared);
else if (strstr(line, "Buffers:"))
- sscanf(line, "Buffers: %ld", &buffers);
+ sscanf(line, "Buffers: %lu", &buffers);
else if (strstr(line, "Cached:"))
- sscanf(line, "Cached: %ld", &cached);
+ sscanf(line, "Cached: %lu", &cached);
else if (strstr(line, "SwapTotal:"))
sscanf(line, "SwapTotal: %ld", &st2->rt_idle);
else if (strstr(line, "SwapFree:"))
- sscanf(line, "SwapFree: %ld", &swapfree);
+ sscanf(line, "SwapFree: %lu", &swapfree);
}
/* memory use - rt_stat is the amount used, it seems, and this isn't
@@ -719,7 +719,7 @@ void update_stat_swp(stat_dev *st)
if (strstr(line, "SwapTotal:"))
sscanf(line, "SwapTotal: %ld", &st->rt_idle);
else if (strstr(line, "SwapFree:"))
- sscanf(line, "SwapFree: %ld", &swapfree);
+ sscanf(line, "SwapFree: %lu", &swapfree);
}
st->rt_stat = st->rt_idle - swapfree;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmmon.git
More information about the Pkg-wmaker-commits
mailing list