Skip to content
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

[BUG] Compilation firmware warning #25100

Closed
1 task done
UndeadBrx opened this issue Dec 15, 2022 · 4 comments
Closed
1 task done

[BUG] Compilation firmware warning #25100

UndeadBrx opened this issue Dec 15, 2022 · 4 comments

Comments

@UndeadBrx
Copy link

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

The following warning pops up during compilation. Build for mks_robin_nano_v1v2

In file included from Marlin\src\lcd\tft\../../inc/MarlinConfigPre.h:37, from Marlin\src\lcd\tft\../../inc/MarlinConfig.h:28, from Marlin\src\lcd\tft\touch.cpp:23: Marlin\src\lcd\tft\../../inc/../core/macros.h: In instantiation of 'constexpr decltype ((lhs + rhs)) _MAX(L, R) [with L = long unsigned int; R = int; decltype ((lhs + rhs)) = long unsigned int]': Marlin\src\lcd\tft\touch.cpp:255:24: required from here Marlin\src\lcd\tft\../../inc/../core/macros.h:436:20: warning: comparison of integer expressions of different signedness: 'const long unsigned int' and 'const int' [-Wsign-compare] 436 | return lhs > rhs ? lhs : rhs; | ~~~~^~~~~

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

bugfix-2.1.x - 2022-12-14

Printer model

No response

Electronics

No response

Add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Configuration.zip

@ellensp
Copy link
Contributor

ellensp commented Dec 15, 2022

This is the fix

diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp
index 6bfc0a8abd..6c81ebefcd 100644
--- a/Marlin/src/lcd/tft/touch.cpp
+++ b/Marlin/src/lcd/tft/touch.cpp
@@ -252,7 +252,7 @@ void Touch::touch(touch_control_t *control) {
 void Touch::hold(touch_control_t *control, millis_t delay) {
   current_control = control;
   if (delay) {
-    repeat_delay = _MAX(delay, MIN_REPEAT_DELAY);
+    repeat_delay = _MAX(delay, uint32_t(MIN_REPEAT_DELAY));
     time_to_hold = next_touch_ms + repeat_delay;
   }
   ui.refresh();

@ellensp
Copy link
Contributor

ellensp commented Dec 15, 2022

A PR has been created to fix this

@ellensp ellensp closed this as completed Dec 15, 2022
@UndeadBrx
Copy link
Author

Thanks.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants