gtkutil.c: In function ‘xg_item_label_same_p’: gtkutil.c:2936:37: error: use of NULL ‘utf8_label’ where non-null expected [CWE-476] [-Werror=analyzer-null-argument] 2936 | && (!old_label || strcmp (utf8_label, old_label) == 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ‘xg_modify_menubar_widgets’: events 1-4 | | 3424 | xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f, | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) entry to ‘xg_modify_menubar_widgets’ |...... | 3432 | if (! list) return; | | ~ | | | | | (2) following ‘false’ branch... | 3433 | | 3434 | cl_data = g_object_get_data (G_OBJECT (menubar), XG_FRAME_DATA); | | ~~~~~~~ | | | | | (3) ...to here | 3435 | | 3436 | xg_update_menubar (menubar, f, &list, list, 0, val->contents, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling ‘xg_update_menubar’ from ‘xg_modify_menubar_widgets’ | 3437 | select_cb, deactivate_cb, highlight_cb, cl_data); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> ‘xg_update_menubar’: events 5-12 | | 2972 | xg_update_menubar (GtkWidget *menubar, | | ^~~~~~~~~~~~~~~~~ | | | | | (5) entry to ‘xg_update_menubar’ |...... | 2983 | if (! iter && ! val) | | ~ | | | | | (6) following ‘false’ branch... | 2984 | return; | 2985 | else if (iter && ! val) | | ~~ ~ | | | | | | | (8) following ‘false’ branch... | | (7) ...to here |...... | 2998 | else if (! iter && val) | | ~~ ~ | | | | | | | (10) following ‘false’ branch... | | (9) ...to here |...... | 3009 | else if (xg_item_label_same_p (GTK_MENU_ITEM (iter->data), val->name)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (12) calling ‘xg_item_label_same_p’ from ‘xg_update_menubar’ | | (11) ...to here | +--> ‘xg_item_label_same_p’: events 13-14 | | 2930 | xg_item_label_same_p (GtkMenuItem *witem, const char *label) | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (13) entry to ‘xg_item_label_same_p’ | 2931 | { | 2932 | char *utf8_label = get_utf8_string (label); | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling ‘get_utf8_string’ from ‘xg_item_label_same_p’ | +--> ‘get_utf8_string’: events 15-16 | | 514 | get_utf8_string (const char *str) | | ^~~~~~~~~~~~~~~ | | | | | (15) entry to ‘get_utf8_string’ |...... | 518 | if (!str) return NULL; | | ~ | | | | | (16) following ‘true’ branch (when ‘str’ is NULL)... | ‘get_utf8_string’: event 17 | |cc1: | (17): ...to here | <------+ | ‘xg_item_label_same_p’: events 18-25 | | 2932 | char *utf8_label = get_utf8_string (label); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) returning to ‘xg_item_label_same_p’ from ‘get_utf8_string’ | 2933 | const char *old_label = witem ? xg_get_menu_item_label (witem) : 0; | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (19) following ‘true’ branch (when ‘witem’ is non-NULL)... | | (20) ...to here | 2934 | | 2935 | bool is_same = (!old_label == !utf8_label | | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | 2936 | && (!old_label || strcmp (utf8_label, old_label) == 0)); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (24) ...to here | | | (25) argument 1 (‘utf8_label’) NULL where non-null expected | | (21) following ‘true’ branch... | | (22) ...to here | | (23) following ‘false’ branch... | In file included from ../lib/string.h:41, from lisp.h:29, from gtkutil.c:36: /usr/include/string.h:140:12: note: argument 1 of ‘strcmp’ must be non-null 140 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:386: gtkutil.o] Error 1 make[1]: Leaving directory '/home/alex/disk/dev/emacs/src' make: *** [Makefile:443: src] Error 2