diff options
author | TingPing <tingping@tingping.se> | 2013-01-19 13:10:54 -0800 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-01-19 13:10:54 -0800 |
commit | 8b49f5f78715bdc0f1a4fcdccc5a414dd6514096 (patch) | |
tree | c224e85b7ebb5a6c9854211dc7f11924a3ca2b0e /plugins/sysinfo/parse.c | |
parent | a46f89998c4faa4b4768e18333ec98c5107ba90b (diff) | |
parent | 4e0daf047ed14e54ea7eeb2c1547cbe06332fbf4 (diff) |
Merge pull request #383 from RichardHitt/warnings
Correct almost all compiler warning issues
Diffstat (limited to 'plugins/sysinfo/parse.c')
-rw-r--r-- | plugins/sysinfo/parse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/sysinfo/parse.c b/plugins/sysinfo/parse.c index c1b478f8..76002900 100644 --- a/plugins/sysinfo/parse.c +++ b/plugins/sysinfo/parse.c @@ -37,9 +37,13 @@ int xs_parse_cpu(char *model, char *vendor, double *freq, char *cache, unsigned int *count) { - char buffer[bsize], *pos; +#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__alpha__) || defined(__ia64__) || defined(__parisc__) || defined(__sparc__) + char buffer[bsize]; +#endif +#if defined(__powerpc__) + char *pos = NULL; +#endif FILE *fp = fopen("/proc/cpuinfo", "r"); - pos = NULL; if(fp == NULL) return 1; if(count != NULL) *count = 0; |