Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 618330

Summary: net-libs/loudmouth-1.5.3 fails to compile with sys-devel/gcc-7.1.0-r1 lm-sasl.c:532:32: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
Product: Gentoo Linux Reporter: Alpha Bravo <aos>
Component: Current packagesAssignee: Wolfram Schlich (RETIRED) <wschlich>
Status: RESOLVED FIXED    
Severity: normal CC: anton.kochkov, jstein, plevine457, toralf
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/mcabber/loudmouth/pull/31
See Also: https://github.com/mcabber/loudmouth/issues/30
https://github.com/gentoo/gentoo/pull/7619
https://bugs.gentoo.org/show_bug.cgi?id=653156
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 617524    
Attachments: emerge --info
build.log
build.log
Patch according to upstream
fixed ebuild to include the patch (attachment 472662)

Description Alpha Bravo 2017-05-13 04:31:44 UTC
Created attachment 472462 [details]
emerge --info

net-libs/loudmouth-1.5.3 fails to compile with sys-devel/gcc-7.1.0-r1

lm-sasl.c: In function 'sasl_md5_prepare_response':
lm-sasl.c:532:32: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (nonce == NULL || nonce == '\0') {
                                ^~
Comment 1 Alpha Bravo 2017-05-13 04:33:28 UTC
Created attachment 472464 [details]
build.log
Comment 2 Alpha Bravo 2017-05-13 08:37:15 UTC
Created attachment 472486 [details]
build.log
Comment 3 Alpha Bravo 2017-05-14 21:36:38 UTC
Fix (cf. https://github.com/mcabber/loudmouth/pull/31/files#diff-78b98fe25577194d06bdb8e3f40946a1):

loudmouth/lm-sasl.c

@@ -529,7 +529,7 @@ sasl_md5_prepare_response (LmSASL *sasl, GHashTable *challenge)
     }
 
     nonce = g_hash_table_lookup (challenge, "nonce");
-    if (nonce == NULL || nonce == '\0') {
+    if (nonce == NULL || nonce[0] == '\0') {
         g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_SASL,
                "%s: server didn't provide a nonce in the challenge",
                G_STRFUNC);
Comment 4 Alpha Bravo 2017-05-15 15:35:36 UTC
Created attachment 472662 [details, diff]
Patch according to upstream
Comment 5 Alpha Bravo 2017-05-15 15:37:20 UTC
Created attachment 472664 [details]
fixed ebuild to include the patch (attachment 472662 [details, diff])
Comment 6 Toralf Förster gentoo-dev 2018-02-02 18:51:56 UTC
*** Bug 638498 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos gentoo-dev 2018-04-03 10:29:49 UTC
*** Bug 649896 has been marked as a duplicate of this bug. ***
Comment 8 Sarah Salzstein 2018-04-10 20:16:56 UTC
Hi,

This is the same with gcc-7.3.0.


Regards,
Sarah
Comment 9 Larry the Git Cow gentoo-dev 2018-04-14 16:01:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5609fa27ea0e940719fa9b89302552fa43699e5

commit b5609fa27ea0e940719fa9b89302552fa43699e5
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2018-03-26 05:25:59 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2018-04-14 15:59:02 +0000

    net-libs/loudmouth: Fix building with GCC-7
    
    Bug: https://bugs.gentoo.org/618330
    Closes: https://bugs.gentoo.org/618330
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../loudmouth/files/loudmouth-1.5.3-gcc7.patch     | 25 ++++++++++++++++++++++
 net-libs/loudmouth/loudmouth-1.5.3.ebuild          |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5609fa27ea0e940719fa9b89302552fa43699e5

commit b5609fa27ea0e940719fa9b89302552fa43699e5
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2018-03-26 05:25:59 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2018-04-14 15:59:02 +0000

    net-libs/loudmouth: Fix building with GCC-7
    
    Bug: https://bugs.gentoo.org/618330
    Closes: https://bugs.gentoo.org/618330
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../loudmouth/files/loudmouth-1.5.3-gcc7.patch     | 25 ++++++++++++++++++++++
 net-libs/loudmouth/loudmouth-1.5.3.ebuild          |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)}
Comment 10 Sarah Salzstein 2018-04-15 17:32:36 UTC
Thanks, this worked for me now!

Regards,
Sarah