Skip to content

UBL_DEVEL_DEBUGGING error: cast to pointer from integer of different size #27654

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

Merged

Conversation

classicrocker883
Copy link
Contributor

@classicrocker883 classicrocker883 commented Jan 26, 2025

Description

When UBL_DEVEL_DEBUGGING is enabled, this warning appears

cast to pointer from integer of different size [-Wint-to-pointer-cast]

basically meshes_start_index() and meshes_end_index() may be too small using hex_address() ->[libs/hex_print.cpp]

Marlin\src\feature\bedlevel\ubl\ubl_G29.cpp: 
In static member function 'static void unified_bed_leveling::g29_what_command()':
Marlin\src\feature\bedlevel\ubl\ubl_G29.cpp:1781:53: 
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1781 |     SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Requirements

AUTO_BED_LEVELING_UBL
UBL_DEVEL_DEBUGGING

Benefits

this stops the warning from appearing

Configurations

Related Issues

@thinkyhead thinkyhead merged commit 0cd1d9c into MarlinFirmware:bugfix-2.1.x Jan 26, 2025
64 checks passed
@classicrocker883 classicrocker883 deleted the bugfix-2.1.x-January3 branch January 27, 2025 04:19
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants