workaround for compiler warnings

This commit is contained in:
Frank Morgner 2014-12-07 17:19:45 +01:00
parent e1fbdc030b
commit e137396d56
2 changed files with 5 additions and 3 deletions

View File

@ -2219,12 +2219,14 @@ iasecc_keyset_change(struct sc_card *card, struct sc_pin_cmd_data *data, int *tr
update.fields[0].parent_tag = IASECC_SDO_KEYSET_TAG;
update.fields[0].tag = IASECC_SDO_KEYSET_TAG_MAC;
update.fields[0].value = data->pin2.data;
/* FIXME is it safe to modify the const value here? */
update.fields[0].value = (unsigned char *) data->pin2.data;
update.fields[0].size = 16;
update.fields[1].parent_tag = IASECC_SDO_KEYSET_TAG;
update.fields[1].tag = IASECC_SDO_KEYSET_TAG_ENC;
update.fields[1].value = data->pin2.data + 16;
/* FIXME is it safe to modify the const value here? */
update.fields[1].value = (unsigned char *) data->pin2.data + 16;
update.fields[1].size = 16;
rv = iasecc_sm_sdo_update(card, (scb & IASECC_SCB_METHOD_MASK_REF), &update);

View File

@ -116,7 +116,7 @@ int sc_bin_to_hex(const u8 *in, size_t in_len, char *out, size_t out_len,
*/
size_t sc_right_trim(u8 *buf, size_t len) {
size_t i;
long i;
for(i=len-1; i >=0; i--) {
if(!isprint(buf[i])) {