diff options
Diffstat (limited to 'community/irssi-xmpp/pointer-comparison.patch')
-rw-r--r-- | community/irssi-xmpp/pointer-comparison.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/community/irssi-xmpp/pointer-comparison.patch b/community/irssi-xmpp/pointer-comparison.patch new file mode 100644 index 00000000000..6b30c42e478 --- /dev/null +++ b/community/irssi-xmpp/pointer-comparison.patch @@ -0,0 +1,46 @@ +Patch-Source: https://github.com/cdidier/irssi-xmpp/commit/f85cb98.patch + + +From f85cb98ff829c96bbdf8d37e113c936f21d20b57 Mon Sep 17 00:00:00 2001 +From: Florian Schlichting <fsfs@debian.org> +Date: Sat, 7 Oct 2017 01:22:22 +0200 +Subject: [PATCH] fix a comparison between pointer and \0 + +``` +xep/disco.c: In function 'disco_request': +xep/disco.c:72:40: warning: comparison between pointer and zero character constant [-Wpointer-compare] + g_return_if_fail(dest != NULL && dest != '\0'); + ^ +/usr/include/glib-2.0/glib/gmacros.h:379:25: note: in definition of macro 'G_LIKELY' + #define G_LIKELY(expr) (expr) + ^~~~ +xep/disco.c:72:2: note: in expansion of macro 'g_return_if_fail' + g_return_if_fail(dest != NULL && dest != '\0'); + ^~~~~~~~~~~~~~~~ +xep/disco.c:72:35: note: did you mean to dereference the pointer? + g_return_if_fail(dest != NULL && dest != '\0'); + ^ +/usr/include/glib-2.0/glib/gmacros.h:379:25: note: in definition of macro 'G_LIKELY' + #define G_LIKELY(expr) (expr) + ^~~~ +xep/disco.c:72:2: note: in expansion of macro 'g_return_if_fail' + g_return_if_fail(dest != NULL && dest != '\0'); + ^~~~~~~~~~~~~~~~ +``` +--- + src/core/xep/disco.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/xep/disco.c b/src/core/xep/disco.c +index e46e116..184d8d2 100644 +--- a/src/core/xep/disco.c ++++ b/src/core/xep/disco.c +@@ -69,7 +69,7 @@ disco_request(XMPP_SERVER_REC *server, const char *dest) + char *recoded; + + g_return_if_fail(IS_XMPP_SERVER(server)); +- g_return_if_fail(dest != NULL && dest != '\0'); ++ g_return_if_fail(dest != NULL && *dest != '\0'); + recoded = xmpp_recode_out(dest); + lmsg = lm_message_new_with_sub_type(recoded, LM_MESSAGE_TYPE_IQ, + LM_MESSAGE_SUB_TYPE_GET); |