Skip to content

Commit

Permalink
virt: fix declaration-after-statement gcc warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <[email protected]>
  • Loading branch information
fabbione committed Mar 12, 2021
1 parent d943186 commit 075aa37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion agents/virt/server/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ listener_config_tcp(config_object_t *config)

done = 0;
do {
text_input("TCP Listen Port", val, inp, sizeof(inp));
char *p;
int ret;

text_input("TCP Listen Port", val, inp, sizeof(inp));

ret = strtol(inp, &p, 0);
if (*p != '\0' || ret <= 0 || ret >= 65536) {
printf("Port value '%s' is out of range\n", val);
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,12 @@ WARNLIST="
all
shadow
missing-prototypes
missing-declarations
strict-prototypes
declaration-after-statement
"

#WARNLIST="
# missing-declarations
# strict-prototypes
# declaration-after-statement
# pointer-arith
# write-strings
Expand Down

0 comments on commit 075aa37

Please sign in to comment.