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 <jpnurmi@digia.com>
This commit is contained in:
parent
b4af1235ef
commit
8259413e41
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user