curl-library
Re: [PATCHv2] mbedtls: Implement CURLOPT_PINNEDPUBLICKEY
Date: Sun, 10 Jan 2016 11:46:46 +0100
Hello Daniel,
> I use "./configure --enable-debug --enable-werror" and then gcc pointed it
> out very loudly to me =)
I see. I added --enable-werror to my default build parameters in the
build script. Last time I screwed up char vs unsigned char I ended up
building a very ugly workaround and to get there I debugged for hours because
printf did not do what I expected it to do. Until a friend told me to simply
use unsigned char. Until that I thought I don't care about the sign of a char.
:-)
-convert_char_array_into_hex_char_array(char *in, char *out, ssize_t len)
+convert_char_array_into_hex_char_array(unsigned char *in, char *out, ssize_t len)
{
int i;
for (i = 0; i < len; i++) {
- sprintf(&out[i * 2], "%02X", in[i] & 0xFF);
+ sprintf(&out[i * 2], "%02X", in[i]);
Cheers,
Thomas
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-10