risacher / sunwait

Sunwait calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights, for use with Windows Task Scheduler or 'cron' on Linux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning when compiling sunwait.cpp and sunriset.cpp

EricClaeys opened this issue · comments

I just compiled the sunwait package and got some warnings.

make[2]: Entering directory '/home/pi/allsky/src/sunwait-src'
gcc -c -Wall  sunwait.cpp -o sunwait.o
sunwait.cpp: In function ‘int main(int, char**)’:
sunwait.cpp:665:62: warning: value computed is not used [-Wunused-value]
     if (arg[0] == '-' && arg[1] != '\0' && !isdigit(arg[1])) *arg++;
                                                              ^~~~~~
gcc -c -Wall  sunriset.cpp -o sunriset.o
sunriset.cpp: In function ‘void sun_RA_dec(double, double*, double*, double*)’:
sunriset.cpp:151:18: warning: variable ‘zs’ set but not used [-Wunused-but-set-variable]
   double xs, ys, zs;
                  ^~

Can these be fixed so end users don't see them? They won't know what to do when they see the messages.
Thanks

I created a Pull Request to fix sunriset.cpp. I don't know how to fix sunwait.cpp.

Closing- the fix was merged last year.