author | Alan Coopersmith <Alan.Coopersmith@Oracle.COM> |
Mon, 25 Apr 2016 23:38:13 -0700 | |
changeset 5890 | e3686c085735 |
permissions | -rw-r--r-- |
5890
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
1 |
Patch from upstream git master branch to fix build failures due to |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
2 |
newer gcc issuing a unused variable warning here that the -Werror |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
3 |
hardcoded in the Makefiles makes fatal. |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
4 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
5 |
https://github.com/json-c/json-c/issues/159 |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
6 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
7 |
From 3859e99f50abe11a8dade28efa9ea3d99dfaac11 Mon Sep 17 00:00:00 2001 |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
8 |
From: =?UTF-8?q?Petar=20Koreti=C4=87?= <[email protected]> |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
9 |
Date: Fri, 11 Apr 2014 10:03:40 +0200 |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
10 |
Subject: [PATCH] Remove unused variable 'size' |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
11 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
12 |
--- |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
13 |
json_tokener.c | 2 -- |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
14 |
1 file changed, 2 deletions(-) |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
15 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
16 |
diff --git a/json_tokener.c b/json_tokener.c |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
17 |
index 19de8ef..9a76293 100644 |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
18 |
--- a/json_tokener.c |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
19 |
+++ b/json_tokener.c |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
20 |
@@ -352,12 +352,10 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
21 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
22 |
case json_tokener_state_inf: /* aka starts with 'i' */ |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
23 |
{ |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
24 |
- int size; |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
25 |
int size_inf; |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
26 |
int is_negative = 0; |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
27 |
|
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
28 |
printbuf_memappend_fast(tok->pb, &c, 1); |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
29 |
- size = json_min(tok->st_pos+1, json_null_str_len); |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
30 |
size_inf = json_min(tok->st_pos+1, json_inf_str_len); |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
31 |
char *infbuf = tok->pb->buf; |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
32 |
if (*infbuf == '-') |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
33 |
-- |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
34 |
2.7.4 |
e3686c085735
23169134 Move json-c library to Userland
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
35 |