mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
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 <sebastian.huber@embedded-brains.de>
libmisc
This directory contains for the "miscellaneous" library. Currently this library contains a number of useful support libraries:
- Task Stack Overflow Checker
- Workspace Consistency Checker
- Task Execution Time Monitor
- Period Statistics Monitor
- Debug Monitor
The following ideas have been mentioned for items which could go in this library, but this list is not all inclusive:
- there are no outstanding suggestions.
The intent of this library is to provide a home for useful utility routines which are dependent upon RTEMS.
--joel 16 Sept 97