Bug 404474 - kde-frameworks/kio-5.55.0 Gentoo package - src/core/job_p.h:266:44: warning: ‘opType’ is used uninitialized in this function [-Wuninitialized]
Summary: kde-frameworks/kio-5.55.0 Gentoo package - src/core/job_p.h:266:44: warning: ...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.55.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-17 11:07 UTC by Unknown
Modified: 2019-03-24 17:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.57


Attachments
info.txt (6.22 KB, text/plain)
2019-02-17 11:08 UTC, Unknown
Details
build.log (829.00 KB, text/plain)
2019-02-17 11:09 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2019-02-17 11:07:46 UTC
I successfully built the kde-frameworks/kio-5.55.0 package on a Gentoo Linux system, but the Portage package manager reports the following warning message:

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/kde-frameworks/kio-5.55.0/work/kio-5.55.0/src/core/job_p.h:266:44: warning: ‘opType’ is used uninitialized in this function [-Wuninitialized]

 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: https://www.kde.org/

I'm using the GCC 8.2.0 compiler.

STEPS TO REPRODUCE

Run the following command on a Gentoo Linux system:

# emerge =kde-frameworks/kio-5.55.0

SOFTWARE/OS VERSIONS

Operating System: Gentoo Linux 
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.55.0
Kernel Version: 4.20.7-gnu
OS Type: 64-bit
Processors: 2 × Intel® Core™2 Duo CPU E8400 @ 3.00GHz
Memory: 7.7 GiB of RAM

ADDITIONAL INFORMATION

emerge -pv kde-frameworks/kio

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] kde-frameworks/kio-5.55.0:5/5.55::gentoo  USE="X kwallet -acl -debug -doc -handbook -kerberos -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Unknown 2019-02-17 11:08:40 UTC
Created attachment 118152 [details]
info.txt

emerge --info
Comment 2 Unknown 2019-02-17 11:09:53 UTC
Created attachment 118153 [details]
build.log
Comment 3 Christoph Feck 2019-03-08 21:11:40 UTC
The compiler cannot see that Delete/Rename/SymLink are the only valid options. Still adding a 'default: return job' case in the switch could be used to silence the warning.
Comment 4 Michael Pyne 2019-03-23 23:06:26 UTC
Potential fix under review at https://phabricator.kde.org/D20008
Comment 5 Michael Pyne 2019-03-24 17:13:54 UTC
Git commit 920d2c4ca7d59695205c1b3675f9a1efa89dd966 by Michael Pyne.
Committed on 24/03/2019 at 17:12.
Pushed by mpyne into branch 'master'.

kjobs: Fix compiler warning for uninit value in SimpleJobPrivate.

GCC 8.2 gives a warning about using an uninitialized value in
SimpleJobPrivate, in a factory function for SimpleJobs that can also
apply relevant JobFlags based on the job's command.

The warning is because the compiler is unable to recognize that the
'command' flag is only able to take the three listed values in this
codepath. Warning fixed by adding a default case.
FIXED-IN: 5.57

Differential Revision: https://phabricator.kde.org/D20008

M  +2    -0    src/core/job_p.h

https://commits.kde.org/kio/920d2c4ca7d59695205c1b3675f9a1efa89dd966