X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fexecution.c;h=a96abfcaf959d6f463fb0f8b7348228ef34dddf1;hb=c18ea70d06e980dc768166881c5aeac0b3491561;hp=3e3d35636f100b2cf6330823c5d814b22d5ad158;hpb=9cb53f2613d0194b85dddfdafc11d7193d6561e3;p=openvswitch diff --git a/ovsdb/execution.c b/ovsdb/execution.c index 3e3d3563..a96abfca 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -103,8 +103,6 @@ ovsdb_execute(struct ovsdb *db, const struct json *params, || !params->u.array.n || params->u.array.elems[0]->type != JSON_STRING || strcmp(params->u.array.elems[0]->u.string, db->schema->name)) { - struct ovsdb_error *error; - if (params->type != JSON_ARRAY) { error = ovsdb_syntax_error(params, NULL, "array expected"); } else { @@ -137,7 +135,7 @@ ovsdb_execute(struct ovsdb *db, const struct json *params, /* Parse and execute operation. */ ovsdb_parser_init(&parser, operation, - "ovsdb operation %zu of %zu", i + 1, n_operations); + "ovsdb operation %zu of %zu", i, n_operations); op = ovsdb_parser_member(&parser, "op", OP_ID); result = json_object_create(); if (op) { @@ -204,7 +202,7 @@ exit: struct ovsdb_error * ovsdb_execute_commit(struct ovsdb_execution *x, struct ovsdb_parser *parser, - struct json *result UNUSED) + struct json *result OVS_UNUSED) { const struct json *durable; @@ -216,9 +214,9 @@ ovsdb_execute_commit(struct ovsdb_execution *x, struct ovsdb_parser *parser, } static struct ovsdb_error * -ovsdb_execute_abort(struct ovsdb_execution *x UNUSED, - struct ovsdb_parser *parser UNUSED, - struct json *result UNUSED) +ovsdb_execute_abort(struct ovsdb_execution *x OVS_UNUSED, + struct ovsdb_parser *parser OVS_UNUSED, + struct json *result OVS_UNUSED) { return ovsdb_error("aborted", "aborted by request"); } @@ -579,7 +577,7 @@ ovsdb_execute_wait_query_cb(const struct ovsdb_row *row, void *aux_) static struct ovsdb_error * ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser, - struct json *result UNUSED) + struct json *result OVS_UNUSED) { struct ovsdb_table *table; const struct json *timeout, *where, *columns_json, *until, *rows; @@ -629,7 +627,6 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser, /* Parse "rows" into 'expected'. */ ovsdb_row_hash_init(&expected, &columns); for (i = 0; i < rows->u.array.n; i++) { - struct ovsdb_error *error; struct ovsdb_row *row; row = ovsdb_row_create(table); @@ -692,7 +689,7 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser, static struct ovsdb_error * ovsdb_execute_comment(struct ovsdb_execution *x, struct ovsdb_parser *parser, - struct json *result UNUSED) + struct json *result OVS_UNUSED) { const struct json *comment;