summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2015-03-10 17:37:12 +1100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-10 14:43:15 +0100
commit1fd5df421ea30ac7f2bd994f58956ce46e90fcec (patch)
tree5b827e58aa4124b32b7dbf57b51619ac78589709
parent5d9286ab811d6382b7f4c48aff6079ed580218d4 (diff)
downloadmeta-qt5-1fd5df421ea30ac7f2bd994f58956ce46e90fcec.tar.gz
qtserialport: backport patch to silence Valgrind warning
Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtserialport-git/0001-Unix-Clear-serial_struct-instances.patch42
-rw-r--r--recipes-qt/qt5/qtserialport.inc4
-rw-r--r--recipes-qt/qt5/qtserialport/0001-Unix-Clear-serial_struct-instances.patch42
3 files changed, 88 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtserialport-git/0001-Unix-Clear-serial_struct-instances.patch b/recipes-qt/qt5/qtserialport-git/0001-Unix-Clear-serial_struct-instances.patch
new file mode 100644
index 00000000..b14cf013
--- /dev/null
+++ b/recipes-qt/qt5/qtserialport-git/0001-Unix-Clear-serial_struct-instances.patch
@@ -0,0 +1,42 @@
1From 53afe73154c7c00b54cd280fa3d6c9127a2bc84b Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Mon, 9 Mar 2015 22:35:56 +1100
4Subject: [PATCH] Unix: Clear serial_struct instances
5
6Silences the following Valgrind warning:
7Conditional jump or move depends on uninitialised value(s)
8
9Upstream-Status: Backport from 5.5 branch
10
11Change-Id: I8fd8cfd6aa6f75ed515e6151cfc282faca508bdc
12Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14---
15 src/serialport/qserialport_unix.cpp | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
19index 34ef41d..7cf356b 100644
20--- a/src/serialport/qserialport_unix.cpp
21+++ b/src/serialport/qserialport_unix.cpp
22@@ -439,6 +439,8 @@ QSerialPortPrivate::setStandardBaudRate(qint32 baudRate, QSerialPort::Directions
23 {
24 struct serial_struct currentSerialInfo;
25
26+ ::memset(&currentSerialInfo, 0, sizeof(currentSerialInfo));
27+
28 if ((::ioctl(descriptor, TIOCGSERIAL, &currentSerialInfo) != -1)
29 && (currentSerialInfo.flags & ASYNC_SPD_CUST)) {
30 currentSerialInfo.flags &= ~ASYNC_SPD_CUST;
31@@ -469,6 +471,8 @@ QSerialPortPrivate::setCustomBaudRate(qint32 baudRate, QSerialPort::Directions d
32
33 struct serial_struct currentSerialInfo;
34
35+ ::memset(&currentSerialInfo, 0, sizeof(currentSerialInfo));
36+
37 if (::ioctl(descriptor, TIOCGSERIAL, &currentSerialInfo) == -1)
38 return decodeSystemError();
39
40--
412.3.2
42
diff --git a/recipes-qt/qt5/qtserialport.inc b/recipes-qt/qt5/qtserialport.inc
index 8bb168e2..c9877c67 100644
--- a/recipes-qt/qt5/qtserialport.inc
+++ b/recipes-qt/qt5/qtserialport.inc
@@ -1,5 +1,9 @@
1require qt5.inc 1require qt5.inc
2 2
3SRC_URI += " \
4 file://0001-Unix-Clear-serial_struct-instances.patch \
5"
6
3DEPENDS += "qtbase" 7DEPENDS += "qtbase"
4 8
5# text of LGPL_EXCEPTION.txt and LICENSE.FDL is slightly different than what 9# text of LGPL_EXCEPTION.txt and LICENSE.FDL is slightly different than what
diff --git a/recipes-qt/qt5/qtserialport/0001-Unix-Clear-serial_struct-instances.patch b/recipes-qt/qt5/qtserialport/0001-Unix-Clear-serial_struct-instances.patch
new file mode 100644
index 00000000..b14cf013
--- /dev/null
+++ b/recipes-qt/qt5/qtserialport/0001-Unix-Clear-serial_struct-instances.patch
@@ -0,0 +1,42 @@
1From 53afe73154c7c00b54cd280fa3d6c9127a2bc84b Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Mon, 9 Mar 2015 22:35:56 +1100
4Subject: [PATCH] Unix: Clear serial_struct instances
5
6Silences the following Valgrind warning:
7Conditional jump or move depends on uninitialised value(s)
8
9Upstream-Status: Backport from 5.5 branch
10
11Change-Id: I8fd8cfd6aa6f75ed515e6151cfc282faca508bdc
12Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14---
15 src/serialport/qserialport_unix.cpp | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
19index 34ef41d..7cf356b 100644
20--- a/src/serialport/qserialport_unix.cpp
21+++ b/src/serialport/qserialport_unix.cpp
22@@ -439,6 +439,8 @@ QSerialPortPrivate::setStandardBaudRate(qint32 baudRate, QSerialPort::Directions
23 {
24 struct serial_struct currentSerialInfo;
25
26+ ::memset(&currentSerialInfo, 0, sizeof(currentSerialInfo));
27+
28 if ((::ioctl(descriptor, TIOCGSERIAL, &currentSerialInfo) != -1)
29 && (currentSerialInfo.flags & ASYNC_SPD_CUST)) {
30 currentSerialInfo.flags &= ~ASYNC_SPD_CUST;
31@@ -469,6 +471,8 @@ QSerialPortPrivate::setCustomBaudRate(qint32 baudRate, QSerialPort::Directions d
32
33 struct serial_struct currentSerialInfo;
34
35+ ::memset(&currentSerialInfo, 0, sizeof(currentSerialInfo));
36+
37 if (::ioctl(descriptor, TIOCGSERIAL, &currentSerialInfo) == -1)
38 return decodeSystemError();
39
40--
412.3.2
42