projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecfcfac
)
Better fix for unused var problem.
author
Brenden Matthews
<brenden@rty.ca>
Mon, 3 Aug 2009 18:56:41 +0000
(12:56 -0600)
committer
Brenden Matthews
<brenden@rty.ca>
Mon, 3 Aug 2009 18:56:41 +0000
(12:56 -0600)
src/conky.h
patch
|
blob
|
history
src/weather.c
patch
|
blob
|
history
diff --git
a/src/conky.h
b/src/conky.h
index
d34d234
..
a10e23d
100644
(file)
--- a/
src/conky.h
+++ b/
src/conky.h
@@
-385,4
+385,7
@@
void set_update_interval(double interval);
#define NOBATTERY 0
+/* to get rid off 'unused variable' warnings */
+#define UNUSED(a) if (a) {}
+
#endif /* _conky_h_ */
diff --git
a/src/weather.c
b/src/weather.c
index
3cc8f4e
..
1e43283
100644
(file)
--- a/
src/weather.c
+++ b/
src/weather.c
@@
-785,6
+785,8
@@
int process_weather_uri(char *uri, char *locID, int dayf)
{
/* locID MUST BE upper-case */
char *tmp_p = locID;
+ UNUSED(dayf); /* make gcc shut up */
+
while (*tmp_p) {
*tmp_p = toupper(*tmp_p);
tmp_p++;
@@
-811,6
+813,5
@@
int process_weather_uri(char *uri, char *locID, int dayf)
} else if (!strstr(uri, "localhost") && !strstr(uri, "127.0.0.1")) {
return -1;
}
- if (dayf) {} /* make gcc shut up */
return 0;
}