aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2021-10-03 16:31:50 -0700
committerPaul Eggert2021-10-03 16:55:17 -0700
commitcc3fc94f09332e5cca28fea1f19a93c8d45fd0f8 (patch)
treece08086100d86fbeeec61c6166801c5d5f622297 /src
parentd3a832a61ab5766b6ec879cee9ab75bbbc62034a (diff)
downloademacs-cc3fc94f09332e5cca28fea1f19a93c8d45fd0f8.tar.gz
emacs-cc3fc94f09332e5cca28fea1f19a93c8d45fd0f8.zip
Pacify gcc 11.2.1 -Wanalyzer-null-argument
* 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).
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 313cfc82c26..e87845caf70 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2932,8 +2932,9 @@ xg_item_label_same_p (GtkMenuItem *witem, const char *label)
2932 char *utf8_label = get_utf8_string (label); 2932 char *utf8_label = get_utf8_string (label);
2933 const char *old_label = witem ? xg_get_menu_item_label (witem) : 0; 2933 const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
2934 2934
2935 bool is_same = (!old_label == !utf8_label 2935 bool is_same = (old_label
2936 && (!old_label || strcmp (utf8_label, old_label) == 0)); 2936 ? utf8_label && strcmp (utf8_label, old_label) == 0
2937 : !utf8_label);
2937 2938
2938 if (utf8_label) g_free (utf8_label); 2939 if (utf8_label) g_free (utf8_label);
2939 2940