From: Richard Levitte Date: Wed, 3 Aug 2016 19:18:55 +0000 (+0200) Subject: evp_test.c: avoid warning from having a pointer difference returned as int X-Git-Tag: OpenSSL_1_0_2i~81 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c78a34f4750b7a35c02033cb50879152d230a192;p=oweals%2Fopenssl.git evp_test.c: avoid warning from having a pointer difference returned as int Reviewed-by: Rich Salz --- diff --git a/crypto/evp/evp_test.c b/crypto/evp/evp_test.c old mode 100644 new mode 100755 index d7441ec7b7..98796427bf --- a/crypto/evp/evp_test.c +++ b/crypto/evp/evp_test.c @@ -76,6 +76,7 @@ static void hexdump(FILE *f, const char *title, const unsigned char *s, int l) static int convert(unsigned char *s) { unsigned char *d; + int digits = 0; for (d = s; *s; s += 2, ++d) { unsigned int n; @@ -86,8 +87,9 @@ static int convert(unsigned char *s) } sscanf((char *)s, "%2x", &n); *d = (unsigned char)n; + digits++; } - return s - d; + return digits; } static char *sstrsep(char **string, const char *delim)