jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
418 stars 65 forks source link

Many warnings (about 100) during compile #79

Closed ustraub closed 5 years ago

ustraub commented 5 years ago

During installation (by running ./mkrelease.sh) many compiler warnings are shown, see attached file mkrelease_out.txt mkrelease_out.txt

jcorporation commented 5 years ago

Many thanks for your issue. Even all compiler warnings are from the embedded mongoose webserver. myMPD uses the latest mongoose source and keep up to date with the latest release is all I can do.

jcorporation commented 5 years ago

@ustraub: thanks for your email.

/home/pi/mympd/myMPD-master/src/validate.c: In function ‘sanitize_string’:
/home/pi/mympd/myMPD-master/src/validate.c:35:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     char *cp = data;

You are right, that isn't correct. I am working on a fix.

/home/pi/mympd/myMPD-master/src/mpd_client.c: In function ‘callback_mympd’:
/home/pi/mympd/myMPD-master/src/mpd_client.c:78:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (cmd_id == -1)

Also this can't be right.

I am ignoring all other warnings for the moment. The source code in the next myMPD major version (branch decoupling) is completely restructured and should have no more warnings.

This issue tolds me to better ignore no warnings, many thanks.

jcorporation commented 5 years ago

During my code rewrite in the decoupling branch, I fixed all compiler warnings in my source files. For a clean compile experience I disabled some compiler flags for the mongoose source. The compiler run should now be clean. The decoupling branch should be merged shortly into master.

jcorporation commented 5 years ago

Fixed in devel branch. Source is now checked with cppcheck and valingrid memchecker.