summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-11-09 16:32:15 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-11-09 16:32:15 (GMT)
commit2ec60d5a71a560460c884be36de8fbad467fb69d (patch)
treedd8695ef5b5a48e3824845436393c943aa500de7 /src/gui
parent0a56b91991a4cce23634173eda4c5bafcd53230b (diff)
downloadQt-2ec60d5a71a560460c884be36de8fbad467fb69d.zip
Qt-2ec60d5a71a560460c884be36de8fbad467fb69d.tar.gz
Qt-2ec60d5a71a560460c884be36de8fbad467fb69d.tar.bz2
Clear X11 structure before use
This squelches valgrind warnings about uninitialized reads Task-number: QT-3973 Reviewed-by: Robert Griebl
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qmotifdnd_x11.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qmotifdnd_x11.cpp b/src/gui/kernel/qmotifdnd_x11.cpp
index 3334455..3b79129 100644
--- a/src/gui/kernel/qmotifdnd_x11.cpp
+++ b/src/gui/kernel/qmotifdnd_x11.cpp
@@ -385,7 +385,10 @@ static void DndReadSourceProperty(Display * dpy,
static void DndWriteReceiverProperty(Display * dpy, Window window,
unsigned char protocol_style)
{
- DndReceiverProp receiver_prop ;
+ DndReceiverProp receiver_prop;
+
+ // squelch potential valgrind errors about uninitialized reads
+ memset(&receiver_prop, 0, sizeof(receiver_prop));
receiver_prop.byte_order = DndByteOrder() ;
receiver_prop.protocol_version = DND_PROTOCOL_VERSION;