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:
ludovic.rousseau 2010-03-28 21:02:56 +00:00
parent cb5dd59d87
commit 3f30d90045
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ int _sc_add_reader(sc_context_t *ctx, sc_reader_t *reader)
}
struct _sc_driver_entry {
char *name;
const char *name;
void *(*func)(void);
};
@ -147,7 +147,7 @@ static void del_drvs(struct _sc_ctx_options *opts, int type)
cp = &opts->ccount;
}
for (i = 0; i < *cp; i++) {
free(lst[i].name);
free((void *)lst[i].name);
}
*cp = 0;
}