From 80fbf1e934ed1e2dafea65e88bb91a501f175a3b Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Wed, 16 Jun 2021 15:04:42 +0000 Subject: [PATCH] make sure l is always initialized I can't think of cases where we reach serialize_iri and path is NULL, but let's keep the safe side and initialize l. gcc 8 found this, clang didn't. --- iri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iri.c b/iri.c index e1552d6..64fcca2 100644 --- a/iri.c +++ b/iri.c @@ -424,7 +424,7 @@ trim_req_iri(char *iri, const char **err) int serialize_iri(struct iri *i, char *buf, size_t len) { - size_t l; + size_t l = 0; /* in ex.c we receive empty "" strings as NULL */ if (i->schema == NULL || i->host == NULL) {