From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexander Kuleshov Newsgroups: gmane.emacs.devel Subject: Adjust gtkutil.c to build with gcc (GCC) 11.2.1 with -Wanalyzer-null-argument Date: Wed, 1 Sep 2021 16:52:55 +0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000004b04305caecdfaa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21938"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 01 13:37:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLOYp-0005Ym-MB for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Sep 2021 13:37:43 +0200 Original-Received: from localhost ([::1]:40538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLOYn-0000iU-Mk for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Sep 2021 07:37:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLNrh-00035V-Lz for emacs-devel@gnu.org; Wed, 01 Sep 2021 06:53:09 -0400 Original-Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]:39625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLNrg-0001XH-1C for emacs-devel@gnu.org; Wed, 01 Sep 2021 06:53:09 -0400 Original-Received: by mail-oi1-x22e.google.com with SMTP id v2so3192318oie.6 for ; Wed, 01 Sep 2021 03:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ygaw9/aGwUNJ+o5fhHpNipAazHRGImwlfaiJGtOOEEQ=; b=h9fkSIZeln/X/hhaEfBoyGEd2UnF24tNxcZCHYsS9HTkd4wy+kYljH/pde8OlMD8PU CumBlWoB2I7zNcorGXA5Yox2rgp8/V/okRuS9cOZ7mbknw7YPkJwd8cMWGcYN+V3dwKa uAXC3fPi/SX4D2/WHHqah/Vse6g/bgRi/ePGEEvBhC1An8XvPmjI7C48eg/cJqRpJ5BJ XQyO/H0G263hmqxc/V0DoQo9Y7hZW3U7tZxr7Mig5hKBxIBLEqykwXiOJApdpaYc2yI3 hJjZFJbCJNhjW+zONA3yTZO/gegu4DpIEk/T97qzMxykxjORxkbKKtqpcxP5aCgRLnI0 eZlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ygaw9/aGwUNJ+o5fhHpNipAazHRGImwlfaiJGtOOEEQ=; b=bWw1xZfX5RtHsET0B5P5StT0MgfMokRidEJ7M5jtLRh9yymYbI27k8qim+4i1RFPBu Ndz2+opzYX9S1fs4MM/7FtAn209XEShy9tE2Whq5JSIwERvJY9R4EBeE4YmDMFLtdK5L 4WXhJgHxnF4Rdci0T66/y0CIewK8fGvKxOOh1jWMzuJ80Kp80PnAHcyKObyYFXO89iAf LAa6UphCyclMOQcZdHHgOiHt8rhBknHmplTvPtsfn4wTwXjN9drZIKi5roOkXNpZmKkh vYVzSliuckqJZkbFXGB7A+8PVtF45bru9pUk6dYasEbMyBuErfD09JgOo2ixg9jDoWww 57MQ== X-Gm-Message-State: AOAM530xMxISjvCW8JSrYNMuMFceAUBbHNp3GdDvy8RLvSL2j8l3JDZ9 QklBHO46LEDyveHWKxF1WyXSO+Y2H/mmgoh5QVvTiuf60Rk= X-Google-Smtp-Source: ABdhPJxj4/hUM09y/ftDQFznlDTrCvHpvoQJo+BJYpOatHZOkmGKkHLO0RxuWVeGfBC0GsGvAVlcAqNdlAfwOed8MXg= X-Received: by 2002:a05:6808:13c8:: with SMTP id d8mr6707336oiw.104.1630493586252; Wed, 01 Sep 2021 03:53:06 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=kuleshovmail@gmail.com; helo=mail-oi1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273640 Archived-At: --00000000000004b04305caecdfaa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I'm getting: gtkutil.c: In function =E2=80=98xg_item_label_same_p=E2=80=99: gtkutil.c:2936:54: error: use of NULL where non-null expected [CWE-476] [-Werror=3Danalyzer-null-argument] 2936 | && ((!old_label && !utf8_label) || strcmp (utf8_label, old_label) =3D=3D 0)); error during building of GNU Emacs from master on Fedora 34 with GCC 11.2.1. I've attached a simple fix for that. Thank you. --00000000000004b04305caecdfaa Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-building-with-gcc-11.1.2-and-Wanalyzer-null-argu.patch" Content-Disposition: attachment; filename="0001-Fix-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