Sebastian Huber created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1437
Project:Branches: sebhub/rtems:fix-stringto-dead-branches to rtems/rtos/rtems:main Author: Sebastian Huber Assignee: Sebastian Huber ## Summary cpukit/libmisc: Remove the dead range checks The string to integer template checked the range of the value in every instantiation. Six of the seven integer instantiations use a conversion method whose type is not wider than the type of the value. For those the two comparisons were constant and the code behind them was dead. Coverity reported this as CID 1700407 to CID 1700418. Emit the range check only where the type of the conversion method is wider than the type of the value. Every instantiation which sets STRING_TO_RESULT_TYPE gives the maximum of that type in STRING_TO_RESULT_MAX. The template compares the two maxima. An undefined macro drops the check without a diagnostic, so a missing STRING_TO_RESULT_MAX is an error. Behaviour is unchanged. Where the two types have the same width, the conversion method sets ERANGE. The template already turns ERANGE into RTEMS_INVALID_NUMBER. Update #5708. Assisted-by: Claude:claude-opus-5 claude-code Signed-off-by: Sebastian Huber <[email protected]> ## Generative AI I used Claude Code. <!-- Default settings, if it is a dropdown it will set after submission --> -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1437 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-a2sn7hkmz9o21fdaiq6ogcsvm-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
