alelievr / libft-unit-test

453 stars 88 forks source link

clang does not make src/test_functions.c on M1 mac #126

Open usatie opened 2 years ago

usatie commented 2 years ago

Thanks for developing useful tools like this!

Worked fine on guacamole, but couldn't ran it on my M1 MacBookAir2020. I just ran these two commands.

$ git clone https://github.com/alelievr/libft-unit-test
$ make -C libft-unit-test
[  Building #0  ]
➤  clang -O2 -funroll-loops -Werror -Wall -Wextra -I./include -o obj/src/test_functions.o -c src/test_functions.c
src/test_functions.c:1633:11: error: variable 'str' set but not used [-Werror,-Wunused-but-set-variable]
                        char    *str;
                                 ^

src/test_functions.c:5054:10: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
                        void    *ret;
                                 ^
src/test_functions.c:6729:10: error: variable 'i1' set but not used [-Werror,-Wunused-but-set-variable]
                        char    *i1;
                                 ^
src/test_functions.c:6749:10: error: variable 'i1' set but not used [-Werror,-Wunused-but-set-variable]
                        char    *i1;
                                 ^
src/test_functions.c:8435:11: error: variable 'str' set but not used [-Werror,-Wunused-but-set-variable]
                        char    *str;
                                 ^
5 errors generated.
make: *** [obj/src/test_functions.o] Error 1
Screen Shot 2022-04-20 at 9 39 16 Screen Shot 2022-04-20 at 9 40 37
usatie commented 2 years ago

For more clang information, please see this.

Screen Shot 2022-04-20 at 9 43 11
SilentJMA commented 2 years ago

any update regarding this issue?

s-sergiu commented 2 years ago

I have the same issues on ubuntu 22.04

peguimasid commented 2 years ago

I solve this issue by changing this in libft-unit-test/Makefile

Is not perfect but is better than remove all unused variables manually

Captura de Tela 2022-05-22 às 3 27 36 PM

github-actions[bot] commented 1 year ago

Hello! Thanks for contributing to the libft unit test.

Note that this repository is not maintained by the owner anymore, instead there is a bot that will automatically merge any reviewed pull requests. If you feel like it, here are some links that can help you submiting a change in the code base::