From: Jay Satiro Date: Sun, 5 Apr 2015 06:25:33 +0000 (-0400) Subject: x509asn1: Silence x64 loss-of-data warning on RSA key length assignment X-Git-Tag: curl-7_42_0~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3101ae287fcfc420bdd816f1eaf39c8dc9b242b;p=thirdparty%2Fcurl.git 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. --- diff --git a/lib/x509asn1.c b/lib/x509asn1.c index e18218d3d3..a163568ed1 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--;