emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adjust gtkutil.c to build with gcc (GCC) 11.2.1 with -Wanalyzer-null


From: Alexander Kuleshov
Subject: Re: Adjust gtkutil.c to build with gcc (GCC) 11.2.1 with -Wanalyzer-null-argument
Date: Wed, 1 Sep 2021 23:20:50 +0600

Yes, I'm trying to get a minimal example to reproduce the same error.

By the way it seems that the previous commit in src/gtkutil.c source
code file fixed similar issue
https://github.com/emacs-mirror/emacs/commit/2337869fbf8b967eb53ee57f978f3751987e43dc#diff-f807e90fbf62c1caf61ddc156d5e165035c18820c2320b701be87f96cb242833R3224

Attached file with the full output, just for the case.

On Wed, Sep 1, 2021 at 7:36 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Alexander Kuleshov <kuleshovmail@gmail.com>
> > Date: Wed, 1 Sep 2021 18:44:34 +0600
> > Cc: emacs-devel <emacs-devel@gnu.org>
> >
> > On Wed, Sep 1, 2021 at 6:26 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > > > From: Alexander Kuleshov <kuleshovmail@gmail.com>
> > > > Date: Wed, 1 Sep 2021 16:52:55 +0600
> > > >
> > > > gtkutil.c: In function ‘xg_item_label_same_p’:
> > > > gtkutil.c:2936:54: error: use of NULL where non-null expected
> > > > [CWE-476] [-Werror=analyzer-null-argument]
> > > >  2936 |                   && ((!old_label && !utf8_label) || strcmp
> > > > (utf8_label, old_label) == 0));
> > >
> > > Isn't this a GCC bug?
> >
> > hmm, yes, possibly. And forget about attachment, I was wrong with
> > `(!old_label == !utf8_label) ||` part.
>
> So maybe report it to their Bugzilla?  If it isn't a bug, perhaps they
> will explain to us what is wrong with our code?
>
> Thanks.

Attachment: gtkutil.error.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]