Skip to content

Commit

Permalink
Plugins (gforce): Stop redefining "true" and "false" for GCC 12
Browse files Browse the repository at this point in the history
.. to fix -Wnarrowing compile errors:

> make[7]: Entering directory '/home/sping/__playground/libvisual-libvisual-GIT/libvisual-plugins/build2/plugins/actor/G-Force/Common/UI'
> /bin/sh ../../../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../../../plugins/actor/G-Force/Common/UI -I../../../../.. -I../../../../../../plugins/actor/G-Force/unix/Headers -I../../../../../../plugins/actor/G-Force/Common -I../../../../../../plugins/actor/G-Force/Common/GeneralTools/Headers -I../../../../../../plugins/actor/G-Force/Common/UI/Headers -I../../../../../../plugins/actor/G-Force/Common/math/Headers -I../../../../../../plugins/actor/G-Force/Common/io/Headers -I../../../../../../plugins/actor/G-Force/unix/libxpce -I../../../../../../plugins/actor/G-Force/unix/libmfl -I../../../../../../plugins/actor/G-Force/unix/libvisual   -DDATADIR="\"/usr/local/share/libvisual-plugins-0.4\"" -g -O2   -DUNIX_X -D_REENTRANT   -DUNIX_X -D_REENTRANT -MT EgOSUtils.lo -MD -MP -MF .deps/EgOSUtils.Tpo -c -o EgOSUtils.lo ../../../../../../plugins/actor/G-Force/Common/UI/EgOSUtils.cpp
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../../plugins/actor/G-Force/Common/UI -I../../../../.. -I../../../../../../plugins/actor/G-Force/unix/Headers -I../../../../../../plugins/actor/G-Force/Common -I../../../../../../plugins/actor/G-Force/Common/GeneralTools/Headers -I../../../../../../plugins/actor/G-Force/Common/UI/Headers -I../../../../../../plugins/actor/G-Force/Common/math/Headers -I../../../../../../plugins/actor/G-Force/Common/io/Headers -I../../../../../../plugins/actor/G-Force/unix/libxpce -I../../../../../../plugins/actor/G-Force/unix/libmfl -I../../../../../../plugins/actor/G-Force/unix/libvisual -DDATADIR=\"/usr/local/share/libvisual-plugins-0.4\" -g -O2 -DUNIX_X -D_REENTRANT -DUNIX_X -D_REENTRANT -MT EgOSUtils.lo -MD -MP -MF .deps/EgOSUtils.Tpo -c ../../../../../../plugins/actor/G-Force/Common/UI/EgOSUtils.cpp  -fPIC -DPIC -o .libs/EgOSUtils.o
> [..]
> In file included from /usr/include/features.h:490,
>                  from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu/bits/os_defines.h:39,
>                  from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu/bits/c++config.h:655,
>                  from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/cstdlib:41,
>                  from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/stdlib.h:36,
>                  from ../../../../../../plugins/actor/G-Force/Common/UI/EgOSUtils.cpp:7:
> /usr/include/stdlib.h:98:45: error: narrowing conversion of '-1' from 'int' to 'bool' [-Wnarrowing]
>    98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
>       |                                             ^~~~~~~
> /usr/include/stdlib.h:103:6: error: narrowing conversion of '-1' from 'int' to 'bool' [-Wnarrowing]
>   103 |      __THROW __attribute_pure__ __nonnull ((1)) __wur;
>       |      ^~~~~~~
> /usr/include/stdlib.h:106:6: error: narrowing conversion of '-1' from 'int' to 'bool' [-Wnarrowing]
>   106 |      __THROW __attribute_pure__ __nonnull ((1)) __wur;
>       |      ^~~~~~~
  • Loading branch information
hartwork committed Nov 27, 2022
1 parent 76ba069 commit aa27110
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libvisual-plugins/plugins/actor/G-Force/Common/EgCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

#include <libmfl.h>

#ifndef true
#define true -1
#define false 0
#endif

struct Rect {
short left, top, right, bottom;
};
Expand Down

0 comments on commit aa27110

Please sign in to comment.