[Pkg-xfce-devel] Bug#811608: FTBFS with GCC 6: nonnull argument compared to NULL

Yves-Alexis Perez corsac at debian.org
Wed Jan 20 07:25:28 UTC 2016

control: tag -1 moreinfo
On mar., 2016-01-19 at 16:15 -0800, Martin Michlmayr wrote:
> This package fails to build with GCC 6.  GCC 6 has not been released
> yet, but it's expected that GCC 6 will become the default compiler for
> stretch.
> Note that only the first error is reported; there might be more.  You
> can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
> you can set CC=gcc-6 CXX=g++-6 explicitly.

Could you add a bit more information about this, especially the new options
> > sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
> ...
> > /bin/bash ../../libtool  --tag=CC   --mode=link gcc -Wall                  -Wstrict-prototypes                  -Wnested-externs                  -Werror=missing-prototypes                  -Werror=implicit-function-declaration                  -Werror=pointer-arith                  -Werror=init-self                  -Werror=format-security                  -Werror=format=2                  -Werror=missing-include-dirs -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security  -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-O1 -o unity-system-compositor unity_system_compositor-unity-system-compositor.o unity_system_compositor-status.o -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lgio-2.0 -lgobject-2.0 -l
> > glib-2.0 
> > libsystem.c: In function 'getpwnam':
> > libsystem.c:859:14: error: nonnull argument 'name' compared to NULL [-Werror=nonnull]
> >      if (name == NULL)

This looks spurious. It's usually considered a *good* idea to check for NULL
pointer, so I don't understand the error. Also, the code is:

struct passwd *
getpwnam (const char *name)
    GList *link;

    if (name == NULL)
        return NULL;

    load_passwd_file ();

    for (link = user_entries; link; link = link->next)
        struct passwd *entry = link->data;
        if (strcmp (entry->pw_name, name) == 0)
    if (!link)
        return NULL;

    return link->data;


- I fail to see how the compiler can statically know name is NULL
- it looks like a good idea to check it anyway before strcmp

So I'm not doing anything on this right now, until I have more information.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20160120/bed7e5d3/attachment.sig>

More information about the Pkg-xfce-devel mailing list