[FIX] Fix uninitialised variables

I'm not sure why Debian's GCC didn't catch this, but NetBSD's did.
Another reason to add CI checks for NetBSD, then, though I am not sure
how to do it safely through VMs(and I doubt Docker/Podman would help me
for weird architectures). Hm.
This commit is contained in:
LDA 2024-10-22 10:26:38 +02:00
commit 4b5a759ce7
2 changed files with 3 additions and 3 deletions

View file

@ -230,8 +230,8 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
if (StrEquals(type, "error")) if (StrEquals(type, "error"))
{ {
char *type, *text, *user, *parsee; char *type = NULL, *text = NULL, *user = NULL, *parsee = NULL;
char *message, *room; char *message = NULL, *room = NULL;
from = HashMapGet(stanza->attrs, "from"); from = HashMapGet(stanza->attrs, "from");
to = HashMapGet(stanza->attrs, "to"); to = HashMapGet(stanza->attrs, "to");

View file

@ -156,7 +156,7 @@ PresenceStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
char *trim = ParseeTrimJID(jid); char *trim = ParseeTrimJID(jid);
char *from = NULL; char *from = NULL;
char *room = ParseeGetBridgedRoom(args, stanza); char *room = ParseeGetBridgedRoom(args, stanza);
char *decode_from, *real_matrix; char *decode_from = NULL, *real_matrix = NULL;
char *matrix_user_pl = ParseeEncodeJID(args->config, trim, false); char *matrix_user_pl = ParseeEncodeJID(args->config, trim, false);
char *affiliation = item ? HashMapGet(item->attrs, "affiliation") : NULL; char *affiliation = item ? HashMapGet(item->attrs, "affiliation") : NULL;
char *role = item ? HashMapGet(item->attrs, "role") : NULL; char *role = item ? HashMapGet(item->attrs, "role") : NULL;