From f810178b1fae09be1ac15e223a84ddf2031eb93f Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 1 Jan 2024 12:22:46 +0100 Subject: Make atom_names const correct Silence some "initialization discards 'const' qualifier from pointer target type" warnings. Signed-off-by: Tim Wiederhake --- src/twm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/twm.c b/src/twm.c index 045622b..c3b002c 100644 --- a/src/twm.c +++ b/src/twm.c @@ -162,7 +162,7 @@ Atom TwmAtoms[11]; Bool use_fontset; /* use XFontSet-related functions or not */ /* don't change the order of these strings */ -static char *atom_names[11] = { +static const char *atom_names[11] = { "_MIT_PRIORITY_COLORS", "WM_CHANGE_STATE", "WM_STATE", @@ -348,7 +348,8 @@ main(int argc, char *argv[]) ScreenContext = XUniqueContext(); ColormapContext = XUniqueContext(); - (void) XInternAtoms(dpy, atom_names, sizeof TwmAtoms / sizeof TwmAtoms[0], + (void) XInternAtoms(dpy, (char **) atom_names, + sizeof TwmAtoms / sizeof TwmAtoms[0], False, TwmAtoms); /* Set up the per-screen global information. */ -- cgit v1.2.3