brtos / brtos-unet

0 stars 3 forks source link

unet_send not compatible with standart C #1

Closed fabricio-godoi closed 7 years ago

fabricio-godoi commented 7 years ago

The function unet_send at transport.c uses "true"/"false" (lowercase) to test where the packet will go. But this isn't defined in the code itself, neither included the stdbool library at some point. I recommend using TRUE/FALSE (uppercase) that is defined in the BRTOS library.

Best regards!

barriquello commented 7 years ago

Thanks Fabrício. However, please note that transport.c includes transport.h, which includes BRTOS.h, which includes OS_types.h, which includes stdbool.h, which defines true/false according to C standard (C99). Our goal is to keep future versions of BRTOS in accordance with C standard as much as possible. So, the use of the TRUE/FALSE macros is deprecated and is not recommended anymore. However, it is kept for compatibility reasons. Please feel free to open new issues you may find. PR are also welcomed. May I close this one?

fabricio-godoi commented 7 years ago

Thanks, Barriquello, now I see my error. My eclipse wasn't searching at ".h", then a didn't see the include of "stdbool" features. However, my eclipse didn't find the definitions of "true/false", and it's configured with the compiler's library (msp430 library). Seeking in the library, I didn't find any definition as well, so I got a bit lost here, but as I read about it, the library define the values. Again, thanks for your reply, the issue is resolved!