Tested on gcc-6.4.0.
- Group Reviewers
- R167:cfa2a3e6d8c1: Fixed warnings that appear when building release version
R167:d47b09af4ed8: Fixed warning in kio_krarcProtocol::put
R167:7118daeb970b: Fixed warning in KrJob::createKrCopyJob
R167:29862bc41a7e: Fixed warnings in Synchronizer::slotTaskFinished
R167:528466e7bca8: Fixed warning in kiso mycallb
If you know how to trigger the branches this patch changes, please test them. Otherwise just thorougly review the diff - the changes
Thanks Nikita for fixing the warnings :). I can only replicate the one in krjob.cpp. How do do I display the rest of the warnings? I've only used -DCMAKE_BUILD_TYPE=Release when calling cmake, is there something else to set up for release building? Maybe the version of my gcc (7.3.1) can play a part in this...
I'm not sure, maybe you compiler has less warnings enabled by default. It might be new behavior of gcc-7 as well. You can try to explicitly specify the -Wunused-result flag and see if a warning appears.
BTW, it's not just my compiler settings, Toni also confirmed this earlier (check his attachment):
Martin, I included warning messages into the merge commit message. The output contains flags that enable the warnings: -Wmaybe-uninitialized -Wstrict-aliasing -Wunused-result (just in case you want to check you compiler).
BTW, it's not just my compiler settings, Toni also confirmed this earlier [...]
Yes, those warnings were seen (although the warnings that Martin was talking about... were not seen :-) using gcc 7.2.0 under Kubuntu 17.10)
Thanks for extensive info! I was still unable to see all the warnings with the flags -Wmaybe-uninitialized -Wstrict-aliasing -Wunused-result enabled. So I guess it is indeed specific to GCC version 7. It doesn't really matter, thanks Nikita for taking care of the warnings!