[oe-commits] Raphael Silva : omgps: fix do_compile error due to uninitialized variable
git at git.openembedded.org
git at git.openembedded.org
Wed Dec 17 12:16:25 UTC 2014
Module: meta-openembedded.git
Branch: master-next
Commit: 08cb9977086ff451a2ad80451f1fc205578059d5
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=08cb9977086ff451a2ad80451f1fc205578059d5
Author: Raphael Silva <rapphil at gmail.com>
Date: Tue Dec 16 16:15:21 2014 -0200
omgps: fix do_compile error due to uninitialized variable
The problem happended since there was an uninitialized variable
with gcc 4.9 and the parameter -Werror=maybe-uninitialized.
Initialized the variable and checked for side effects.
Removed from blacklist.
Signed-off-by: Raphael Silva <rapphil at gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
.../omgps/omgps/fix.build.with.gcc.4.9.patch | 22 ++++++++++++++++++++++
meta-oe/recipes-navigation/omgps/omgps_svn.bb | 3 +--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.gcc.4.9.patch b/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.gcc.4.9.patch
new file mode 100644
index 0000000..1680bc0
--- /dev/null
+++ b/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.gcc.4.9.patch
@@ -0,0 +1,22 @@
+omgps: omgps fails compilation due to uninitialized variables
+
+omgps does not compile with gcc 4.9 due to uninitialized variables
+with the option -Werror=maybe-uninitialized
+To solve the problem, just initiated the variable and checked for side
+effects.
+Upstream-Status: Submitted
++https://code.google.com/p/omgps/issues/detail?id=16
+
+Signed-off-by: Raphael Silva <rapphil at gmail.com>
+diff -urpN omgps.orig/src/sound.c omgps/src/sound.c
+--- omgps.orig/src/sound.c 2014-12-14 15:13:29.609243994 -0200
++++ omgps/src/sound.c 2014-12-14 15:14:13.831116745 -0200
+@@ -44,7 +44,7 @@ static gboolean play_sound_files(char *f
+ return FALSE;
+
+ char *bak = strdup(files);
+- char *saveptr;
++ char *saveptr = NULL;
+ char *p = strtok_r(bak, ";", &saveptr);
+
+ #define MAX_SOUND_FILES 14
diff --git a/meta-oe/recipes-navigation/omgps/omgps_svn.bb b/meta-oe/recipes-navigation/omgps/omgps_svn.bb
index aabdd43..ea879d5 100644
--- a/meta-oe/recipes-navigation/omgps/omgps_svn.bb
+++ b/meta-oe/recipes-navigation/omgps/omgps_svn.bb
@@ -9,8 +9,6 @@ PV = "0.1+svnr${SRCPV}"
PR = "r2"
S = "${WORKDIR}/${PN}"
-PNBLACKLIST[omgps] ?= "BROKEN: sound.c:61:35: error: 'saveptr' may be used uninitialized in this function [-Werror=maybe-uninitialized]"
-
do_configure_prepend() {
sed -i "s#PY_VERSION = 2.6#PY_VERSION = ${PYTHON_BASEVERSION}#g" ${S}/Makefile.am
sed -i "s#PY_INC_DIR = \$(OPIEDIR)#PY_INC_DIR = ${STAGING_DIR_HOST}#g" ${S}/Makefile.am
@@ -24,6 +22,7 @@ SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;protocol=http \
file://fix.build.with.glib.2.34.patch \
file://gdk-pixbuf-2.26.5.patch \
file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \
+ file://fix.build.with.gcc.4.9.patch \
"
inherit autotools pkgconfig
More information about the Openembedded-commits
mailing list