Closed thomas-touhey closed 9 years ago
It seems that your compiler is more strict and does not accept a memset() call with zero length. You should use the same error flags as those used at 42 to avoid surprises :)
I do use the same error flags as the ones I was using at 42 in my Makefile ("clang -Wall -Werror -Wextra", exactly what the moulinette was using according to the traces), and I left your Makefiles as is. But as I'm working on my own computer and as it's not a Macbook... well, I realized today that the differences could be significant. So the errors must come from the builds differences between my gcc/clang and the one at 42. Sorry about taking all that time to realize D:
The differences are not so bad and they are making you a better programmer.
Between Linux and Darwin kernels you can find some differencies like with is_something series. I use a personnal way like telling to the Makefile which source use to compile : Darwin/Linux under the libft -> https://github.com/JulienBalestra/libft/tree/master/srcs
You also can use define (way I choose for libftASM).
Also, I suggest you to work under Valgrind as soon as possible. In fact Linux (ubuntu / Debian) are more soft with invalid write / read, double free, ... than MacOS (Darwin) is. You can have a program working (and silent real problems) but they wouldn't work under Darwin.
In last, I really abuse of Travis because I don't want to buy an expensive Apple computer just to run test. Get an look how to do here : https://github.com/JulienBalestra/minishell/blob/master/.travis.yml
2015-11-11 18:18 GMT+01:00 Thomas Touhey notifications@github.com:
I do use the same error flags as the ones I was using at 42 in my Makefile ("clang -Wall -Werror -Wextra", exactly what the moulinette was using according to the traces), and I left your Makefiles as is. But as I'm working on my own computer and as it's not a Macbook... well, I realized today that the differences could be significant. So the errors must come from the builds differences between my gcc/clang and the one at 42. Sorry about taking all that time to realize D:
— Reply to this email directly or view it on GitHub https://github.com/yyang42/moulitest/issues/14#issuecomment-155851118.
I like the way you differenciate the two kernels. I thought about doing it with macros (#ifdef linux), but as the Norm says so, "Macros defining code are forbidden", so I did it the same way as you in the end.
Also, Valgrind and Travis look interesting. I'll try those as soon as I can, thanks. ^^
Hi, I wanted to test my libft, but it looks like one of the memset tests won't compile :
As a workaround, I commented line 9 of the libft_tests/tests/00_part1_ft_memset.spec.c, but why is this error here ?