On 32bit systems, int and long are the same size. This is not the case
on 64bit systems. This corrects the maximum value of the stringto type
on those systems.
libc's strto* functions' behaviour isn't defined when the passed string
is NULL. In glibc it causes a seg fault when I tested it. This could
cause inconsistency.
rtem's stringto* functions didnt previously checked for null before
passing to underlying strto* functions.
Added the check which returns `RTEMS_INVALID_ADDRESS` on failure.
Also added a test case for the same
Signed-off-by: Prashant Rahul <prashantrahul141@protonmail.com>
This adapts stringto template file to adhere to the new api
Adds a special case for uchar conversion
Signed-off-by: Prashant Rahul <prashantrahul141@protonmail.com>
This adds special defines in case of conversion to unsigned char
Adds missing defines in some of the other stringto functions
and adds the stringto.h header to all stringto* implementations
Signed-off-by: Prashant Rahul <prashantrahul141@protonmail.com>
This warning occurs when comparing a signed variable to an unsigned one.
This is frequently an int or ssize_t variable compared to a uint32_t or
size_t. Sometimes the size_t is from a sizeof() use.
This warning indicates the potential for using a local variable which
is not guaranteed to be preserved across a setjmp()/longjmp() pair.
In this case, it was a false positive and the warning was disabled.
Updates #5364.
The call to Untar_FromMemory_Print() on line 400 was passing
false as the third argument. "rtems_printer *" was expected.
In C previous to C23, false was a macro defined as 0 and could
be converted to a pointer. In C23, false, true, and bool are keywords.
The sizeof(ino_t) can potentially vary based on the target. This
resulted in -Wformat warnings. Add PRIdino_t in <rtems/inttypes.h>
to have a portable format specifier.
Closes#5393.
Address missing field initializer warnings.
These were all rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization. The initialization was changed to using named
fields.
Updates #5325.
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
libmisc/shell was in a previous patch.
The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
This also moves the header from <utf8proc/utf8proc.h> to <utf8proc.h> This
follows what the upstream project uses and keeps us from having to modify
upstream source to put it in a subdirectory.