Skip to content

Fix deprecated type and erroneous function calls #68

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ClementFoucher
Copy link

Hello,

I just bought a eink display from AdaFruit, as well as STM32 feather board, and wanted to give a try to this library.
However, out of the box, I found two errors and a warning when using my usual toolchain (Platformio + STM32duino).

  • The warning refers to the use of the boolean Arduino type. As stated here, this type is deprecated and totally equivalent to the standard bool type. While this is not a blocking issue, I always intend as fixing every warning when coding, so that I can see in a glimpse in my terminal that everything went well.
  • The errors are related to calling the min() function with different data type for the arguments. As one can see here, both arguments must be of the same type, and these calls mixed uint32_t type with the result of the sizeof() operator, which returns a size_t, as stated here. This is a blocking error with my toolchain, and could be resolved easily by casting the result of the sizeof() operator used as one of the argument to match the other.

I can't see any use case in which these changes would cause any issue, as one commit is the resolution of a deprecated type to the matching standard type, and the other tend to follow the C++ correct syntax.

Big love to AdaFruit and its wonderful products!

@ClementFoucher ClementFoucher changed the title Fix deprecated Fix deprecated types and erroneous function calls Sep 16, 2022
@ClementFoucher ClementFoucher changed the title Fix deprecated types and erroneous function calls Fix deprecated type and erroneous function calls Sep 16, 2022
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

Successfully merging this pull request may close these issues.

2 participants