classifier: Rewrite.
[openvswitch] / lib / json.c
index b08540ec592fdc1fd3283c7f2ac8bd7e195e0b7f..5887f677a42d731f71ade48ea1368f196bcb2c9d 100644 (file)
@@ -705,7 +705,6 @@ json_lex_number(struct json_parser *p)
      *
      * We suppress negative zeros as a matter of policy. */
     if (!significand) {
-        struct json_token token;
         token.type = T_INTEGER;
         token.u.integer = 0;
         json_parser_input(p, &token);
@@ -1186,7 +1185,7 @@ json_parser_put_value(struct json_parser *p, struct json *value)
     }
 }
 
-static struct json_parser_node *
+static void
 json_parser_push(struct json_parser *p,
                  struct json *new_json, enum json_parse_state new_state)
 {
@@ -1205,12 +1204,10 @@ json_parser_push(struct json_parser *p,
         node = &p->stack[p->height++];
         node->json = new_json;
         p->parse_state = new_state;
-        return node;
     } else {
         json_destroy(new_json);
         json_error(p, "input exceeds maximum nesting depth %d",
                    JSON_MAX_HEIGHT);
-        return NULL;
     }
 }