X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-ovsdb.c;h=04db65421a29ff1a03b65c2572af4735e2919782;hb=fb8c93473efacd67a50117d0f2a3084f2d96ceca;hp=18784a52a2dd488b8f01a354e3ddd83fa83f2425;hpb=d931cde4d74ef1eee77594dd60c3a5b587394a1a;p=openvswitch diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index 18784a52..04db6542 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -1095,7 +1095,7 @@ do_query_distinct(int argc OVS_UNUSED, char *argv[]) size_t n_classes; struct json *json; int exit_code = 0; - size_t i, j, k; + size_t i; /* Parse table schema, create table. */ json = unbox_json(parse_json(argv[1])); @@ -1161,6 +1161,7 @@ do_query_distinct(int argc OVS_UNUSED, char *argv[]) for (i = 0; i < json->u.array.n; i++) { struct ovsdb_row_set results; struct ovsdb_condition cnd; + size_t j; check_ovsdb_error(ovsdb_condition_from_json(ts, json->u.array.elems[i], NULL, &cnd)); @@ -1171,6 +1172,8 @@ do_query_distinct(int argc OVS_UNUSED, char *argv[]) ovsdb_row_set_init(&results); ovsdb_query_distinct(table, &cnd, &columns, &results); for (j = 0; j < results.n_rows; j++) { + size_t k; + for (k = 0; k < n_rows; k++) { if (uuid_equals(ovsdb_row_get_uuid(results.rows[j]), &rows[k].uuid)) { @@ -1833,7 +1836,6 @@ do_idl(int argc, char *argv[]) for (i = 2; i < argc; i++) { char *arg = argv[i]; struct jsonrpc_msg *request, *reply; - int error; if (*arg == '+') { /* The previous transaction didn't change anything. */