codam-coding-college/MLX42

[REQUEST] Update README example

pulgamecanica opened this issue · 1 comments

Hello Good day!

It bothers me that the example given on the README doesn't compiles straight away with -Wall -Werror & -Wextra
Even more because the recommended Makefile does indeed include this flags, so my proposal would be to fix it.

The issues are as follows:
Screenshot from 2024-01-23 13-34-09

  1. srcs/main.c:25:31: error: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare] (for both the loops)
  2. srcs/main.c:23:25: error: unused parameter ‘param’ [-Werror=unused-parameter]
  3. srcs/main.c:58:22: error: unused parameter ‘argc’ [-Werror=unused-parameter]
  4. srcs/main.c:58:40: error: unused parameter ‘argv’ [-Werror=unused-parameter]

Solutions:

  1. use uint32_t instead of int32_t
  2. (void) param;
  3. & 4. int main(void) {

If you allow me, I can submit a PR with this changes :D

Cheers, and keep it up, this library is Gold! 🏆

If you allow me, I can submit a PR with this changes :D

By all means go right ahead and submit a PR, i'll merge it asap.