From 8259413e410b4291d1cef319c90718ff853a3ffc Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 21 Sep 2014 19:38:37 +0200 Subject: GTK syle: initialize all members of GdkColor Coverity rightfully complains that we're copying a struct with an uninitialized member, triggering undefined behavior. Change-Id: I7635b859eb11e5eb9b825df8e23b453116059892 Reviewed-by: J-P Nurmi --- src/widgets/styles/qgtkstyle.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/styles/qgtkstyle.cpp') diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp index 9fa056960a..8ca6898b3d 100644 --- a/src/widgets/styles/qgtkstyle.cpp +++ b/src/widgets/styles/qgtkstyle.cpp @@ -297,6 +297,7 @@ static QColor mergedColors(const QColor &colorA, const QColor &colorB, int facto static GdkColor fromQColor(const QColor &color) { GdkColor retval; + retval.pixel = 0; retval.red = color.red() * 255; retval.green = color.green() * 255; retval.blue = color.blue() * 255; -- cgit v1.2.3