summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-24 12:23:55 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-04-26 20:14:15 +0200
commitc9f063c218181e4eac3a0a67d74ce91b898a6443 (patch)
tree9558b322a98b7a85bc2b9628cd7869a4c80a9583 /meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch
parentdb1ceb94283fcc15d4c0ae812f85b9212cec1ba9 (diff)
downloadmeta-openembedded-c9f063c218181e4eac3a0a67d74ce91b898a6443.tar.gz
mozjs: Fix build with gcc7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch b/meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch
new file mode 100644
index 000000000..40d646c7d
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs/0001-compare-the-first-character-of-string-to-be-null-or-.patch
@@ -0,0 +1,32 @@
1From f36c9476d2816e0d3e61c9e13c22ed73883cb54a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 24 Apr 2017 12:13:43 -0700
4Subject: [PATCH] compare the first character of string to be null or not
5
6Fixes
7
8error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9| if (value[0] == '\0')
10| ^~~~
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 js/src/shell/jsoptparse.cpp | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp
18index b49d0a5..612aa00 100644
19--- a/js/src/shell/jsoptparse.cpp
20+++ b/js/src/shell/jsoptparse.cpp
21@@ -243,7 +243,7 @@ OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value)
22 char *eq = strchr(argv[*i], '=');
23 if (eq) {
24 *value = eq + 1;
25- if (value[0] == '\0')
26+ if (value[0][0] == '\0')
27 return error("A value is required for option %.*s", eq - argv[*i], argv[*i]);
28 return Okay;
29 }
30--
312.12.2
32