Skip to content

Commit

Permalink
Fix compiler warning: variable may be used uninitialized
Browse files Browse the repository at this point in the history
../src/commands.c: In function ‘CmdEscapeCheck’:
../src/commands.c:1057:48: warning: ‘old_read_timeout’ may be used uninitialized [-Wmaybe-uninitialized]
 1057 |                 ccid_descriptor -> readTimeout = old_read_timeout;
      |                                                ^
../src/commands.c:948:13: note: ‘old_read_timeout’ was declared here
  948 |         int old_read_timeout;
      |             ^
  • Loading branch information
LudovicRousseau committed Oct 24, 2024
1 parent 4841404 commit ab307ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ RESPONSECODE CmdEscapeCheck(unsigned int reader_index,
status_t res;
unsigned int length_in, length_out;
RESPONSECODE return_value = IFD_SUCCESS;
int old_read_timeout;
int old_read_timeout = -1;
_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);

/* a value of 0 do not change the default read timeout */
Expand Down

0 comments on commit ab307ea

Please sign in to comment.