Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang11 report error: cast to smaller integer type #82

Open
phpstatic opened this issue Dec 10, 2020 · 3 comments
Open

clang11 report error: cast to smaller integer type #82

phpstatic opened this issue Dec 10, 2020 · 3 comments

Comments

@phpstatic
Copy link

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
Copy link
Contributor

vtorri commented Dec 10, 2020

look at https://github.com/lexbor/lexbor instead, modest is not maintained anymore and is replaced by lexbor

@alonchin
Copy link

@phpstatic have you been able to fix the issue?

@alonchin
Copy link

Probably you are trying to build it on osx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants