Skip to content

Commit 4484457

Browse files
committed
samples: shell: shell_module: mitigate sonarqube warning
This mitigates a sonarqube warning "Value stored to 'cvalue' is never read" > Unused assignments should be removed c:S1854 https://sonarcloud.io/project/issues?pullRequest=97152&\ open=AZnAZi4C7BgzESPFIGwf&id=zephyrproject-rtos_zephyr Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1 parent 0bf74ef commit 4484457

File tree

1 file changed

+0
-4
lines changed
  • samples/subsys/shell/shell_module/src

1 file changed

+0
-4
lines changed

samples/subsys/shell/shell_module/src/main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ static int cmd_demo_getopt_ts(const struct shell *sh, size_t argc,
110110
char **argv)
111111
{
112112
struct getopt_state *state;
113-
char *cvalue = NULL;
114113
int aflag = 0;
115114
int bflag = 0;
116115
int c;
@@ -125,7 +124,6 @@ static int cmd_demo_getopt_ts(const struct shell *sh, size_t argc,
125124
bflag = 1;
126125
break;
127126
case 'c':
128-
cvalue = state->optarg;
129127
break;
130128
case 'h':
131129
/* When getopt is active shell is not parsing
@@ -161,7 +159,6 @@ static int cmd_demo_getopt_ts(const struct shell *sh, size_t argc,
161159
static int cmd_demo_getopt(const struct shell *sh, size_t argc,
162160
char **argv)
163161
{
164-
char *cvalue = NULL;
165162
int aflag = 0;
166163
int bflag = 0;
167164
int c;
@@ -175,7 +172,6 @@ static int cmd_demo_getopt(const struct shell *sh, size_t argc,
175172
bflag = 1;
176173
break;
177174
case 'c':
178-
cvalue = optarg;
179175
break;
180176
case 'h':
181177
/* When getopt is active shell is not parsing

0 commit comments

Comments
 (0)