diff --git a/src/conn.c b/src/conn.c index 26df418..e35a735 100644 --- a/src/conn.c +++ b/src/conn.c @@ -681,7 +681,8 @@ void xmpp_conn_disable_tls(xmpp_conn_t * const conn) static void _log_open_tag(xmpp_conn_t *conn, char **attrs) { char buf[4096]; - size_t len, pos; + size_t pos; + int len; int i; if (!attrs) return; diff --git a/src/md5.c b/src/md5.c index c4ac4ac..01231b1 100644 --- a/src/md5.c +++ b/src/md5.c @@ -148,7 +148,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) PUT_32BIT_LSB_FIRST(digest + 4, ctx->buf[1]); PUT_32BIT_LSB_FIRST(digest + 8, ctx->buf[2]); PUT_32BIT_LSB_FIRST(digest + 12, ctx->buf[3]); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } #ifndef ASM_MD5 diff --git a/src/parser_libxml2.c b/src/parser_libxml2.c index ab10a4b..1efe4fe 100644 --- a/src/parser_libxml2.c +++ b/src/parser_libxml2.c @@ -46,7 +46,7 @@ static void _set_attributes(xmpp_stanza_t *stanza, const xmlChar **attrs) if (!attrs) return; for (i = 0; attrs[i]; i += 2) { - xmpp_stanza_set_attribute(stanza, attrs[i], attrs[i+1]); + xmpp_stanza_set_attribute(stanza, (const char *)attrs[i], (const char *)attrs[i+1]); } }