gcc and clang report warnings due to -Wwrite-strings:
$ docker run -it --rm -v "$PWD":/workspace -w /workspace gcc sh -c 'apt-get update &&
apt-get -y install libxcb1-dev libxcb-randr0-dev &&
make'
(...)
cc -pipe -o2 -Wstrict-overflow=5 -fstack-protector-all -W -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wfloat-equal -Wformat-y2k -Winit-self -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=nfc -Wold-style-definition -Woverlength-strings -Wpacked -Wpadded -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing=2 -Wstrict-prototypes -Wundef -Wunsafe-loop-optimizations -Wvolatile-register-var -Wwrite-strings "-DAUTORANDR_PATH=\"\"" -o autorandr-launcher autorandr_launcher.c -lxcb -lxcb-randr
autorandr_launcher.c: In function 'ar_launch':
<command-line>: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
autorandr_launcher.c:47:41: note: in expansion of macro 'AUTORANDR_PATH'
47 | static char *argv[] = { AUTORANDR_PATH, "--change", "--default", "default", NULL};
| ^~~~~~~~~~~~~~
autorandr_launcher.c:47:57: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
47 | static char *argv[] = { AUTORANDR_PATH, "--change", "--default", "default", NULL};
| ^~~~~~~~~~
autorandr_launcher.c:47:69: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
47 | static char *argv[] = { AUTORANDR_PATH, "--change", "--default", "default", NULL};
| ^~~~~~~~~~~
autorandr_launcher.c:47:82: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
47 | static char *argv[] = { AUTORANDR_PATH, "--change", "--default", "default", NULL};
| ^~~~~~~~~