Hello!
In macOS High Sierra, Version 10.13.4, the struct
typedef struct {
unsigned char *value;
Atom encoding;
int format;
unsigned long nitems;
} XTextProperty;
has a pointer so Clang (Apple LLVM version 9.1.0 (clang-902.0.39.1), Target: x86_64-apple-darwin17.5.0) complains:
/usr/bin/clang++ -DHAVE_CONFIG_H -I. -include ./config.h -I./src/FbTk -I/opt/local/include -pipe -Os -stdlib=libc++ -arch x86_64 -MT util/fluxbox_remote-fluxb\
ox-remote.o -MD -MP -MF util/.deps/fluxbox_remote-fluxbox-remote.Tpo -c -o util/fluxbox_remote-fluxbox-remote.o test -f 'util/fluxbox-remote.cc' || echo './'ut\
il/fluxbox-remote.cc
util/fluxbox-remote.cc:76:32: error: ordered comparison between pointer and zero ('unsigned char *' and 'int')
&& text_prop.value > 0
~~~~~~~~~~~~~~~ ^ ~
1 error generated.
make[2]: *** [util/fluxbox_remote-fluxbox-remote.o] Error 1
--
Greetings
Pete
This patch seems to cure the failure:
--- util/fluxbox-remote.cc~ 2015-02-08 11:44:45.000000000 +0100
+++ util/fluxbox-remote.cc 2018-03-31 13:56:09.000000000 +0200
@@ -73,7 +73,7 @@
if (strcmp(cmd, "result") == 0) {
XTextProperty text_prop;
if (XGetTextProperty(disp, root, &text_prop, atom_result) != 0
- && text_prop.value > 0
+ && text_prop.value != nullptr
&& text_prop.nitems > 0) {
--
Pete
https://sourceforge.net/p/fluxbox/bugs/1138/
https://sourceforge.net/p/fluxbox/bugs/1138/
fixed via http://git.fluxbox.org/fluxbox.git/commit/?id=22866c4d30f5b289c429c5ca88d800200db4fc4f