Review Request 127131: kcoreaddons: Fix many clang warnings

Michael Pyne mpyne at kde.org
Sun Feb 21 18:49:57 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127131/#review92619
-----------------------------------------------------------



Jenkins has reported a build failure (https://build.kde.org/job/kcoreaddons%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/117/console), looks like we might have dueling compiler errors:

    18:07:28 /home/jenkins/builds/kcoreaddons/kf5-qt5/src/lib/io/kdirwatch.cpp:137:1: error: control reaches end of non-void function [-Werror=return-type]

Seems that the GCC used on CI doesn't recognize that every possible error case is handled in the switch (or alternately, it assumes that someone might try to shoehorn an out-of-range enumeration value into the function). GCC 5.3 works fine, which is what I'd used for testing. But it might be easier to revert the switch/case portions of the patch, perhaps add warning suppressions instead?

- Michael Pyne


On Feb. 21, 2016, 5:39 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127131/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2016, 5:39 p.m.)
> 
> 
> Review request for KDE Frameworks and Michael Pyne.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> (C casts, global functions without static, unused default statements...)
> 
> This detected a small bug in kdirwatch, where fall-through was unintended
> (I know, because I wrote that code).
> 
> 
> Diffs
> -----
> 
>   autotests/kjobtest.cpp aedde39f35ec7bafeb13ffd33d8eb871f60b29eb 
>   autotests/kprocesstest.cpp 2ac756c973b12b895af6fa34ff5077d2d064af8b 
>   src/desktoptojson/main.cpp 45bdcba8f5e7ab395f52ebf8d31ccde826e77434 
>   src/lib/caching/kshareddatacache.cpp 0c1c61cc7f70969748d102c8313fadc73cef55a5 
>   src/lib/io/kautosavefile.cpp e540630179b17b18b7dce5480969aab89d45be34 
>   src/lib/io/kdirwatch.cpp 4b900228c74c609d26e52542bd42e124c6d1d39b 
>   src/lib/io/kdirwatch_p.h af74ff15869b6f9c16bb14f81b6c488dd082de19 
>   src/lib/io/kfilesystemtype.cpp 3526de8ab710f31dabad09026b9b993785658033 
>   src/lib/io/kmessage.h 590a1fe961a220bb2e879b35b4936bf9a1cdfdbb 
>   src/lib/io/kprocess.cpp 2bd8aee1293adf3b5fe549fa2cff675160a5ea96 
>   src/lib/jobs/kjob.cpp 1ad2c2858ee7ed2167a740a10fb7b185d8833288 
>   src/lib/kaboutdata.cpp 3193808797c53586bea94768dc81867e35a8a535 
>   src/lib/plugin/desktopfileparser.cpp 1122af8ba3640a7f06819063157069b652a4f904 
>   src/lib/plugin/desktopfileparser_p.h f19be800e5af2cc120a8ad4f9561e92dbf9fd2c7 
>   src/lib/plugin/kpluginloader.cpp 530e7b865022b680a473fceceb7d659196e9420d 
>   src/lib/randomness/krandom.cpp 93b917d23c2ab8ec7a10277ea8bd49d6f9a61fd7 
>   src/lib/randomness/krandomsequence.cpp 01490bfac5e5fda0ba509fb791bdd1e791f90cbd 
>   src/lib/text/kmacroexpander_unix.cpp f773291ffe961c1a01235eb6eaf79488461eac59 
>   src/lib/text/ktexttohtml.cpp 0fe2a2d69de1d42341cb3ad50c236c21c0aa1f06 
>   src/lib/text/ktexttohtmlemoticonsinterface.h 8fcd30f6c93424aeb103243a0e080798a56fdcc1 
>   src/lib/util/kformatprivate.cpp 9af072dcf3068d8056582be046e38bab48a548a5 
>   src/lib/util/kshell.cpp 0f2e1d46e0761320b871949da594a9b60e2feaf5 
>   src/lib/util/kuser_unix.cpp 01120f6928e04682ca11c0a0822047b43c2f047b 
> 
> Diff: https://git.reviewboard.kde.org/r/127131/diff/
> 
> 
> Testing
> -------
> 
> Compiled with clang; ran autotests.
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160221/f81820e7/attachment.html>


More information about the Kde-frameworks-devel mailing list