Avoid variable name space collision

reader-pcsc.c:396: warning: declaration of 'priv' shadows a previous local
reader-pcsc.c:367: warning: shadowed declaration is here
reader-pcsc.c:909: warning: declaration of 'reader' shadows a previous local
reader-pcsc.c:901: warning: shadowed declaration is here 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3519 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2008-05-22 12:22:23 +00:00
parent f2b103547f
commit ca2da1bd67
1 changed files with 6 additions and 6 deletions

View File

@ -393,14 +393,14 @@ static int pcsc_wait_for_event(sc_reader_t **readers,
ctx = readers[0]->ctx;
pcsc_ctx = priv->gpriv->pcsc_ctx;
for (i = 0; i < nslots; i++) {
struct pcsc_private_data *priv = GET_PRIV_DATA(readers[i]);
struct pcsc_private_data *priv2 = GET_PRIV_DATA(readers[i]);
rgReaderStates[i].szReader = priv->reader_name;
rgReaderStates[i].szReader = priv2->reader_name;
rgReaderStates[i].dwCurrentState = SCARD_STATE_UNAWARE;
rgReaderStates[i].dwEventState = SCARD_STATE_UNAWARE;
/* Can we handle readers from different PCSC contexts? */
if (priv->gpriv->pcsc_ctx != pcsc_ctx)
if (priv2->gpriv->pcsc_ctx != pcsc_ctx)
return SC_ERROR_INVALID_ARGUMENTS;
}
@ -906,12 +906,12 @@ static int pcsc_detect_readers(sc_context_t *ctx, void *prv_data)
int found = 0;
for (i=0;i < sc_ctx_get_reader_count (ctx) && !found;i++) {
sc_reader_t *reader = sc_ctx_get_reader (ctx, i);
if (reader == NULL) {
sc_reader_t *reader2 = sc_ctx_get_reader (ctx, i);
if (reader2 == NULL) {
ret = SC_ERROR_INTERNAL;
goto err1;
}
if (reader->ops == &pcsc_ops && !strcmp (reader->name, p)) {
if (reader2->ops == &pcsc_ops && !strcmp (reader2->name, p)) {
found = 1;
}
}