Use a "const char *" to store a const C-string ptr. Fix a lot (162) 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@4175 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2010-03-28 21:00:41 +00:00
parent 6add573782
commit cb5dd59d87
2 changed files with 6 additions and 6 deletions

View File

@ -882,11 +882,11 @@ int _sc_free_atr(sc_context_t *ctx, struct sc_card_driver *driver)
struct sc_atr_table *src = &driver->atr_map[i];
if (src->atr)
free(src->atr);
free((void *)src->atr);
if (src->atrmask)
free(src->atrmask);
free((void *)src->atrmask);
if (src->name)
free(src->name);
free((void *)src->name);
src->card_atr = NULL;
src = NULL;
}

View File

@ -54,12 +54,12 @@ extern "C" {
struct sc_atr_table {
/* The atr fields are required to
* be in aa:bb:cc hex format. */
char *atr;
const char *atr;
/* The atrmask is logically AND'd with an
* card atr prior to comparison with the
* atr reference value above. */
char *atrmask;
char *name;
const char *atrmask;
const char *name;
int type;
unsigned long flags;
/* Reference to card_atr configuration block,