Little update... The error code come from notcurses.h so can't change that and also since 3 months I compile without problem but now
when #include <notcurses/notcurses.h> I obtain this error !
/opt/homebrew/Cellar/notcurses/3.0.9_1/include/notcurses/notcurses.h:205:12: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
return !(ncchannel_default_p(channel) | ncchannel_palindex_p(channel));
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
||
/opt/homebrew/Cellar/notcurses/3.0.9_1/include/notcurses/notcurses.h:205:12: note: cast one or both operands to int to silence this warning
1 error generated.
I don't think it's related to notcurses itself... but last week, everything was ok. I came back from a trip with my laptop and when trying to compile, I now have this error.
In notcurses.h the function in error is :
201 // Is this channel using RGB color?
202 static inline bool
203 ncchannel_rgb_p(uint32_t channel){
# 204 ***// bitwise or is intentional (allows compiler more freedom)***
205 return !(ncchannel_default_p(channel) | ncchannel_palindex_p(channel));
206 }
I tried to update brew, gcc, and notcurses I use $(pkg-config --cflags --libs notcurses) in compilation
Is there a way to resolve that without
- modifying notcurses.h
- removing -Werror -Wall -Wextra on compile line
Should I reinstall MacOs ?
One could replace the
with
to resolve the warning and to allow the compiler to prevent branching with
||.