Use a "const char *" to store a const C-string ptr. Fix a lot (31) of
warning: initialization discards qualifiers from pointer target type Also cast from now (const char *) to (void *) for free() git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4176 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
cb5dd59d87
commit
3f30d90045
|
@ -46,7 +46,7 @@ int _sc_add_reader(sc_context_t *ctx, sc_reader_t *reader)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct _sc_driver_entry {
|
struct _sc_driver_entry {
|
||||||
char *name;
|
const char *name;
|
||||||
void *(*func)(void);
|
void *(*func)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ static void del_drvs(struct _sc_ctx_options *opts, int type)
|
||||||
cp = &opts->ccount;
|
cp = &opts->ccount;
|
||||||
}
|
}
|
||||||
for (i = 0; i < *cp; i++) {
|
for (i = 0; i < *cp; i++) {
|
||||||
free(lst[i].name);
|
free((void *)lst[i].name);
|
||||||
}
|
}
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue