- Warning fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1731 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
9779f07467
commit
85d6bc7922
|
@ -107,7 +107,7 @@ static int jcop_init(struct sc_card *card)
|
|||
struct sc_file *f;
|
||||
int flags;
|
||||
|
||||
drvdata=malloc(sizeof(struct jcop_private_data));
|
||||
drvdata=(struct jcop_private_data *) malloc(sizeof(struct jcop_private_data));
|
||||
if (!drvdata)
|
||||
return SC_ERROR_OUT_OF_MEMORY;
|
||||
memset(drvdata, 0, sizeof(struct jcop_private_data));
|
||||
|
@ -478,7 +478,7 @@ static int jcop_process_fci(struct sc_card *card, struct sc_file *file,
|
|||
u8 *filelist;
|
||||
nfiles=file->prop_attr[4];
|
||||
if (nfiles) {
|
||||
filelist=malloc(2*nfiles);
|
||||
filelist=(u8 *) malloc(2*nfiles);
|
||||
if (!filelist)
|
||||
return SC_ERROR_OUT_OF_MEMORY;
|
||||
memcpy(filelist, &file->prop_attr[5], 2*nfiles);
|
||||
|
|
|
@ -1080,7 +1080,6 @@ static CK_RV pkcs15_create_object(struct sc_pkcs11_card *p11card,
|
|||
CK_OBJECT_HANDLE_PTR phObject)
|
||||
{
|
||||
struct sc_profile *profile = NULL;
|
||||
struct pkcs15_slot_data *data;
|
||||
CK_OBJECT_CLASS _class;
|
||||
int rv, rc;
|
||||
|
||||
|
@ -1184,7 +1183,6 @@ CK_RV pkcs15_gen_keypair(struct sc_pkcs11_card *p11card, struct sc_pkcs11_slot *
|
|||
struct sc_profile *profile = NULL;
|
||||
struct sc_pkcs15_pin_info *pin;
|
||||
struct pkcs15_fw_data *fw_data = (struct pkcs15_fw_data *) p11card->fw_data;
|
||||
struct pkcs15_slot_data *p15_data = slot_data(slot->fw_data);
|
||||
struct sc_pkcs15_card *p15card = fw_data->p15_card;
|
||||
struct sc_pkcs15init_keygen_args keygen_args;
|
||||
struct sc_pkcs15init_pubkeyargs pub_args;
|
||||
|
@ -1371,7 +1369,6 @@ CK_RV pkcs15_set_attrib(struct sc_pkcs11_session *session,
|
|||
struct sc_profile *profile = NULL;
|
||||
struct sc_pkcs11_card *p11card = session->slot->card;
|
||||
struct pkcs15_fw_data *fw_data = (struct pkcs15_fw_data *) p11card->fw_data;
|
||||
struct pkcs15_slot_data *p15_data = slot_data(session->slot->fw_data);
|
||||
struct sc_pkcs15_id id;
|
||||
int rc = 0;
|
||||
CK_RV rv = CKR_OK;
|
||||
|
|
|
@ -128,7 +128,8 @@ cryptoflex_init_card(sc_profile_t *profile, sc_card_t *card)
|
|||
{
|
||||
sc_path_t path;
|
||||
sc_file_t *file;
|
||||
u8 buf[32], serial[128];
|
||||
u8 buf[32];
|
||||
char serial[128];
|
||||
size_t len;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ jcop_generate_key(sc_profile_t *profile, sc_card_t *card,
|
|||
args.exponent = 0x10001;
|
||||
sc_append_file_id(&args.pub_file_ref, temppubfile->id);
|
||||
sc_append_file_id(&args.pri_file_ref, keyfile->id);
|
||||
keybuf=malloc(keybits / 8);
|
||||
keybuf=(unsigned char *) malloc(keybits / 8);
|
||||
if (!keybuf) {
|
||||
r=SC_ERROR_OUT_OF_MEMORY;
|
||||
goto out;
|
||||
|
|
Loading…
Reference in New Issue