Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-6732: Remove line of code that is not reached #4797

Merged
merged 6 commits into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions src/vos/tests/evt_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static struct evt_desc_cbs ts_evt_desc_nofree_cbs = {
};

static void
ts_open_create(void **state)
ts_open_create(void)
{
bool create;
char *arg;
Expand Down Expand Up @@ -166,7 +166,7 @@ ts_open_create(void **state)
}

static void
ts_close_destroy(void **state)
ts_close_destroy(void)
{
bool destroy;
int rc;
Expand Down Expand Up @@ -321,7 +321,7 @@ bio_strdup(struct utest_context *utx, bio_addr_t *addr, const char *str)
}

static void
ts_add_rect(void **state)
ts_add_rect(void)
{
char *val;
bio_addr_t bio_addr = {0}; /* Fake bio addr */
Expand Down Expand Up @@ -375,7 +375,7 @@ ts_add_rect(void **state)
}

static void
ts_delete_rect(void **state)
ts_delete_rect()
{
char *val;
struct evt_entry ent;
Expand Down Expand Up @@ -421,7 +421,7 @@ ts_delete_rect(void **state)
}

static void
ts_remove_rect(void **state)
ts_remove_rect(void)
{
char *arg;
struct evt_rect rect;
Expand Down Expand Up @@ -458,7 +458,7 @@ ts_remove_rect(void **state)


static void
ts_find_rect(void **state)
ts_find_rect(void)
{
struct evt_entry *ent;
char *val;
Expand Down Expand Up @@ -506,7 +506,7 @@ ts_find_rect(void **state)
}

static void
ts_list_rect(void **state)
ts_list_rect(void)
{
char *val;
daos_anchor_t anchor;
Expand Down Expand Up @@ -651,7 +651,7 @@ ts_list_rect(void **state)
#define TS_VAL_CYCLE 4

static void
ts_many_add(void **state)
ts_many_add(void)
{
char *buf;
char *tmp;
Expand Down Expand Up @@ -757,7 +757,7 @@ ts_many_add(void **state)
}

static void
ts_tree_debug(void **state)
ts_tree_debug(void)
{
int level;
char *arg;
Expand All @@ -768,12 +768,12 @@ ts_tree_debug(void **state)
}

static void
ts_drain(void **state)
ts_drain(void)
{
static int const drain_creds = 256;
int rc;

ts_many_add(state);
ts_many_add();
while (1) {
bool destroyed = false;
int creds = drain_creds;
Expand Down Expand Up @@ -2279,50 +2279,49 @@ static int
ts_cmd_run(char opc, char *args)
{
int rc = 0;
void **st = NULL;

tst_fn_val.optval = args;
tst_fn_val.input = true;

switch (opc) {
case 'C':
ts_open_create(st);
ts_open_create();
break;
case 'D':
ts_close_destroy(st);
ts_close_destroy();
break;
case 'o':
tst_fn_val.input = false;
tst_fn_val.optval = NULL;
ts_open_create(st);
ts_open_create();
break;
case 'c':
tst_fn_val.input = false;
ts_close_destroy(st);
ts_close_destroy();
break;
case 'a':
ts_add_rect(st);
ts_add_rect();
break;
case 'm':
ts_many_add(st);
ts_many_add();
break;
case 'e':
ts_drain(st);
ts_drain();
break;
case 'f':
ts_find_rect(st);
ts_find_rect();
break;
case 'l':
ts_list_rect(st);
ts_list_rect();
break;
case 'd':
ts_delete_rect(st);
ts_delete_rect();
break;
case 'r':
ts_remove_rect(st);
ts_remove_rect();
break;
case 'b':
ts_tree_debug(st);
ts_tree_debug();
break;
case 't':
break;
Expand All @@ -2337,8 +2336,6 @@ ts_cmd_run(char opc, char *args)
rc = 0;
break;
}
if (st != NULL)
rc = -1;

return rc;
}
Expand Down