New Defects reported by Coverity Scan for RTEMS
scan-admin at coverity.com
scan-admin at coverity.com
Wed Aug 19 21:13:11 UTC 2026
Hi,
Please find the latest report on new defect(s) introduced to RTEMS found with Coverity Scan.
12 new defect(s) introduced to RTEMS found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 12 of 12 defect(s)
** CID 1700418: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_int()
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_int()
_____________________________________________________________________________________________
*** CID 1700418: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_int()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700418: (CONSTANT_EXPRESSION_RESULT)
>>> "result > 2147483647" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_int()
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
>>> CID 1700418: (CONSTANT_EXPRESSION_RESULT)
>>> "result < -2147483648L /* -2147483647 - 1 */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
141 if ( result < STRING_TO_MIN ) {
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
** CID 1700417: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_long()
_____________________________________________________________________________________________
*** CID 1700417: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_long()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700417: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "result > 4294967295UL /* 2147483647L * 2UL + 1UL */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
** CID 1700416: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_long_long()
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_long_long()
_____________________________________________________________________________________________
*** CID 1700416: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_long_long()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700416: (CONSTANT_EXPRESSION_RESULT)
>>> "result > 9223372036854775807LL" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_long_long()
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
>>> CID 1700416: (CONSTANT_EXPRESSION_RESULT)
>>> "result < -9223372036854775808LL /* -9223372036854775807LL - 1LL */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
141 if ( result < STRING_TO_MIN ) {
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
** CID 1700415: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_int()
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_int()
_____________________________________________________________________________________________
*** CID 1700415: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_int()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700415: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_int()
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
>>> CID 1700415: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
147 #ifdef STRING_TO_MAX
** CID 1700414: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_int()
_____________________________________________________________________________________________
*** CID 1700414: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_int()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700414: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
** CID 1700413: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_long_long()
_____________________________________________________________________________________________
*** CID 1700413: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_long_long()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700413: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "result > 18446744073709551615ULL /* 9223372036854775807LL * 2ULL + 1ULL */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
** CID 1700412: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_long()
_____________________________________________________________________________________________
*** CID 1700412: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_long()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700412: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
** CID 1700411: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_long_long()
_____________________________________________________________________________________________
*** CID 1700411: Control flow issues (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_unsigned_long_long()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700411: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
** CID 1700410: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_long()
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_long()
_____________________________________________________________________________________________
*** CID 1700410: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_long()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700410: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_long()
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
>>> CID 1700410: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
147 #ifdef STRING_TO_MAX
** CID 1700409: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_int()
_____________________________________________________________________________________________
*** CID 1700409: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_unsigned_int()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700409: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "result > 4294967295UL /* 2147483647 * 2U + 1U */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
** CID 1700408: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_long()
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_long()
_____________________________________________________________________________________________
*** CID 1700408: (CONSTANT_EXPRESSION_RESULT)
/cpukit/libmisc/stringto/stringto_template.h: 141 in rtems_string_to_long()
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
>>> CID 1700408: (CONSTANT_EXPRESSION_RESULT)
>>> "result < -2147483648L /* -2147483647L - 1L */" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
141 if ( result < STRING_TO_MIN ) {
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
/cpukit/libmisc/stringto/stringto_template.h: 135 in rtems_string_to_long()
129 }
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
>>> CID 1700408: (CONSTANT_EXPRESSION_RESULT)
>>> "result > 2147483647L" is always false regardless of the values of its operands. This occurs as the logical operand of "if".
135 if ( result > STRING_TO_MAX ) {
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
** CID 1700407: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_long_long()
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_long_long()
_____________________________________________________________________________________________
*** CID 1700407: (DEADCODE)
/cpukit/libmisc/stringto/stringto_template.h: 136 in rtems_string_to_long_long()
130
131 /*
132 * The conversion method returns a type which can be wider than the type of
133 * the value, so the range of the value has to be checked.
134 */
135 if ( result > STRING_TO_MAX ) {
>>> CID 1700407: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
/cpukit/libmisc/stringto/stringto_template.h: 142 in rtems_string_to_long_long()
136 errno = ERANGE;
137 return RTEMS_INVALID_NUMBER;
138 }
139
140 #ifdef STRING_TO_MIN
141 if ( result < STRING_TO_MIN ) {
>>> CID 1700407: (DEADCODE)
>>> Execution cannot reach this statement: "_tls_errno = 34;".
142 errno = ERANGE;
143 return RTEMS_INVALID_NUMBER;
144 }
145 #endif
146 #else
147 #ifdef STRING_TO_MAX
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/rtems?tab=overview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/build/attachments/20260819/8f437527/attachment-0001.htm>
More information about the build
mailing list