1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 05:59:07 +00:00

Better fix for unused var problem.

This commit is contained in:
Brenden Matthews 2009-08-03 12:56:41 -06:00
parent ecfcfacce3
commit efa5a211b7
2 changed files with 5 additions and 1 deletions

View File

@ -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_ */

View File

@ -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;
}