summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation
diff options
context:
space:
mode:
authorRaphael Silva <rapphil@gmail.com>2014-12-16 16:15:21 -0200
committerMartin Jansa <Martin.Jansa@gmail.com>2014-12-19 20:10:57 +0100
commit17a7d74dbedb7bd5268efc373b6a4c07a592a55e (patch)
tree8f730855d42000f3d455f2d68159a6b3f08966b9 /meta-oe/recipes-navigation
parent71e0dbf975c546b9e3dfcc72ab0ef91f9a956e53 (diff)
downloadmeta-openembedded-17a7d74dbedb7bd5268efc373b6a4c07a592a55e.tar.gz
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@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation')
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps/fix.build.with.gcc.4.9.patch22
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps_svn.bb3
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 000000000..1680bc062
--- /dev/null
+++ b/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.gcc.4.9.patch
@@ -0,0 +1,22 @@
1omgps: omgps fails compilation due to uninitialized variables
2
3omgps does not compile with gcc 4.9 due to uninitialized variables
4with the option -Werror=maybe-uninitialized
5To solve the problem, just initiated the variable and checked for side
6effects.
7Upstream-Status: Submitted
8+https://code.google.com/p/omgps/issues/detail?id=16
9
10Signed-off-by: Raphael Silva <rapphil@gmail.com>
11diff -urpN omgps.orig/src/sound.c omgps/src/sound.c
12--- omgps.orig/src/sound.c 2014-12-14 15:13:29.609243994 -0200
13+++ omgps/src/sound.c 2014-12-14 15:14:13.831116745 -0200
14@@ -44,7 +44,7 @@ static gboolean play_sound_files(char *f
15 return FALSE;
16
17 char *bak = strdup(files);
18- char *saveptr;
19+ char *saveptr = NULL;
20 char *p = strtok_r(bak, ";", &saveptr);
21
22 #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 aabdd43f1..ea879d561 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}"
9PR = "r2" 9PR = "r2"
10S = "${WORKDIR}/${PN}" 10S = "${WORKDIR}/${PN}"
11 11
12PNBLACKLIST[omgps] ?= "BROKEN: sound.c:61:35: error: 'saveptr' may be used uninitialized in this function [-Werror=maybe-uninitialized]"
13
14do_configure_prepend() { 12do_configure_prepend() {
15 sed -i "s#PY_VERSION = 2.6#PY_VERSION = ${PYTHON_BASEVERSION}#g" ${S}/Makefile.am 13 sed -i "s#PY_VERSION = 2.6#PY_VERSION = ${PYTHON_BASEVERSION}#g" ${S}/Makefile.am
16 sed -i "s#PY_INC_DIR = \$(OPIEDIR)#PY_INC_DIR = ${STAGING_DIR_HOST}#g" ${S}/Makefile.am 14 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 \
24 file://fix.build.with.glib.2.34.patch \ 22 file://fix.build.with.glib.2.34.patch \
25 file://gdk-pixbuf-2.26.5.patch \ 23 file://gdk-pixbuf-2.26.5.patch \
26 file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \ 24 file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \
25 file://fix.build.with.gcc.4.9.patch \
27" 26"
28 27
29inherit autotools pkgconfig 28inherit autotools pkgconfig