There was an error while loading. Please reload this page.
1 parent e107254 commit 2746e03Copy full SHA for 2746e03
i3bar/src/xcb.c
@@ -1515,7 +1515,9 @@ static void send_tray_clientmessage(void) {
1515
static void init_tray(void) {
1516
DLOG("Initializing system tray functionality\n");
1517
/* request the tray manager atom for the X11 display we are running on */
1518
- char atomname[strlen("_NET_SYSTEM_TRAY_S") + 11];
+ /* The following line cannot use strlen as that makes compilation fail with
1519
+ * some versions of clang (-Wgnu-folding-constant): */
1520
+ char atomname[18 /* strlen("_NET_SYSTEM_TRAY_S") */ + 11];
1521
snprintf(atomname, strlen("_NET_SYSTEM_TRAY_S") + 11, "_NET_SYSTEM_TRAY_S%d", screen);
1522
xcb_intern_atom_cookie_t tray_cookie;
1523
if (tray_reply == NULL) {
0 commit comments