From c3101ae287fcfc420bdd816f1eaf39c8dc9b242b Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Sun, 5 Apr 2015 02:25:33 -0400 Subject: [PATCH] x509asn1: Silence x64 loss-of-data warning on RSA key length assignment 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. --- lib/x509asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x509asn1.c b/lib/x509asn1.c index e18218d3d..a163568ed 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -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--;