mate-desktop / libmateweather

Library to access weather information from online services
https://mate-desktop.org
GNU Lesser General Public License v2.1
21 stars 24 forks source link

test_sun_moon.c: remove unused variable try 2 #57

Closed lukefromdc closed 6 years ago

lukefromdc commented 6 years ago

Fix warning


test_sun_moon.c: In function ‘main’:
test_sun_moon.c:21:21: warning: variable ‘bsun’ set but not used [-Wunused-but-set-variable]
     gboolean        bsun, bmoon;
                     ^~~~

Run the calc_sun_time(&info, info.update) function but don't load the result into a variable that is never used. Apparently running calc_sun_time sets a result elsewhere that shows up when test_sun_moon is run

monsta commented 6 years ago

Apparently running calc_sun_time sets a result elsewhere that shows up when test_sun_moon is run

This function calls another one which modifies contents of info (see calc_sun2 function in weather-sun.c), so it's needed here, while its return value isn't used afterwards.