]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify gcc 11.2.1 -Wanalyzer-null-argument
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Oct 2021 23:31:50 +0000 (16:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Oct 2021 23:55:17 +0000 (16:55 -0700)
* src/gtkutil.c (xg_item_label_same_p): Clarify boolean expression
to pacify -Wanalyzer-null-argument with GCC 11.2.1 20210728
(Red Hat 11.2.1-1).

src/gtkutil.c

index 313cfc82c26c77361e0583abcf80ffb7b3a7d02e..e87845caf7006746d5bedd8fe7fb5efb5b0bd28f 100644 (file)
@@ -2932,8 +2932,9 @@ xg_item_label_same_p (GtkMenuItem *witem, const char *label)
   char *utf8_label = get_utf8_string (label);
   const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
 
-  bool is_same = (!old_label == !utf8_label
-                 && (!old_label || strcmp (utf8_label, old_label) == 0));
+  bool is_same = (old_label
+                 ? utf8_label && strcmp (utf8_label, old_label) == 0
+                 : !utf8_label);
 
   if (utf8_label) g_free (utf8_label);