+2002-12-23 Ezra Peisach <epeisach@bu.edu>
+
+ * asn1_k_decode.c (asn1_decode_sam_challenge_2_body): Add
+ unused_var declaration to cleanup warnings. Signed/unsigned fix as
+ well.
+
2002-11-07 Ezra Peisach <epeisach@bu.edu>
* asn1_k_encode.c (asn1_encode_sam_challenge_2): Test for error
{
setup();
{ char *save, *end;
+ size_t alloclen;
begin_structure();
if (tagnum != 0) return ASN1_MISSING_FIELD;
if (asn1class != CONTEXT_SPECIFIC || construction != CONSTRUCTED)
return ASN1_BAD_ID;
save = subbuf.next;
{ sequence_of_no_tagvars(&subbuf);
+ unused_var(size);
end_sequence_of_no_tagvars(&subbuf);
}
end = subbuf.next;
- if ((val->sam_challenge_2_body.data = (char *) malloc(end - save)) == NULL)
+ alloclen = end - save;
+ if ((val->sam_challenge_2_body.data = (char *) malloc(alloclen)) == NULL)
return ENOMEM;
- val->sam_challenge_2_body.length = end - save;
- memcpy(val->sam_challenge_2_body.data, save, end - save);
+ val->sam_challenge_2_body.length = alloclen;
+ memcpy(val->sam_challenge_2_body.data, save, alloclen);
next_tag();
get_field(val->sam_cksum, 1, asn1_decode_sequence_of_checksum);
end_structure();