clang11 report error: cast to smaller integer type
Opened this issue · 3 comments
phpstatic commented
modest/source/mycss/selectors/function_parser.c:469:57: error: cast to smaller integer type 'mycss_selectors_function_drop_type_t' (aka 'enum mycss_selectors_function_drop_type') from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
mycss_selectors_function_drop_type_t drop_val = mycss_selector_value_drop(selector->value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modest/include/mycss/selectors/value.h:28:41: note: expanded from macro 'mycss_selector_value_drop'
#define mycss_selector_value_drop(obj) ((mycss_selectors_function_drop_type_t)(obj))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[70/138] Building C object CMakeFiles/modest_static.dir/source/mycss/selectors/serialization.c.o
FAILED: CMakeFiles/modest_static.dir/source/mycss/selectors/serialization.c.o
clang -DMyCORE_BUILD_WITHOUT_THREADS -Imodest/include -O3 -DNDEBUG -Wall -Werror -pipe -pedantic -Wno-unused-variable -Wno-unused-function -std=gnu99 -MD -MT CMakeFiles/modest_static.dir/source/mycss/selectors/serialization.c.o -MF CMakeFiles/modest_static.dir/source/mycss/selectors/serialization.c.o.d -o CMakeFiles/modest_static.dir/source/mycss/selectors/serialization.c.o -c modest/source/mycss/selectors/serialization.c
modest/source/mycss/selectors/serialization.c:183:69: error: cast to smaller integer type 'mycss_selectors_function_drop_type_t' (aka 'enum mycss_selectors_function_drop_type') from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
mycss_selectors_function_drop_type_t drop_val = mycss_selector_value_drop(selector->value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modest/include/mycss/selectors/value.h:28:41: note: expanded from macro 'mycss_selector_value_drop'
#define mycss_selector_value_drop(obj) ((mycss_selectors_function_drop_type_t)(obj))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[96/138] Building C object CMakeFiles/modest_static.dir/source/myencoding/encoding.c.o
vtorri commented
look at https://github.com/lexbor/lexbor instead, modest is not maintained anymore and is replaced by lexbor
alonchin commented
@phpstatic have you been able to fix the issue?
alonchin commented
Probably you are trying to build it on osx?