Skip to content

Commit

Permalink
x509asn1: Silence x64 loss-of-data warning on RSA key length assignment
Browse files Browse the repository at this point in the history
The key length in bits will always fit in an unsigned long so the
loss-of-data warning assigning the result of x64 pointer arithmetic to
an unsigned long is unnecessary.
  • Loading branch information
jay authored and bagder committed Apr 6, 2015
1 parent d363c07 commit c3101ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/x509asn1.c
Expand Up @@ -820,7 +820,7 @@ static void do_pubkey(struct SessionHandle * data, int certnum,
/* Compute key length. */
for(q = elem.beg; !*q && q < elem.end; q++)
;
len = (elem.end - q) * 8;
len = (unsigned long)((elem.end - q) * 8);
if(len)
for(i = *(unsigned char *) q; !(i & 0x80); i <<= 1)
len--;
Expand Down

0 comments on commit c3101ae

Please sign in to comment.