mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-21 08:21:58 +02:00
![]() __fatal_error routine doesn't check strerror_r() return value, which results in the following compile time warning: posix_timers.c: In function ‘__fatal_error’: posix_timers.c:31:9: warning: ignoring return value of ‘strerror_r’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 31 | strerror_r(errno, buf, sizeof(buf)); Fix this by adding a check for return value and error handling appropriate for the GNU-specific strerror_r() in use in __fatal_error(). Check if return string is null and handle accordingly. From Linux strerror_r() manual page: "The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte." Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: John Stultz <jstultz@google.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> |
||
---|---|---|
.. | ||
.gitignore | ||
adjtick.c | ||
alarmtimer-suspend.c | ||
change_skew.c | ||
clocksource-switch.c | ||
freq-step.c | ||
inconsistency-check.c | ||
leap-a-day.c | ||
leapcrash.c | ||
Makefile | ||
mqueue-lat.c | ||
nanosleep.c | ||
nsleep-lat.c | ||
posix_timers.c | ||
raw_skew.c | ||
rtcpie.c | ||
set-2038.c | ||
set-tai.c | ||
set-timer-lat.c | ||
set-tz.c | ||
settings | ||
skew_consistency.c | ||
threadtest.c | ||
valid-adjtimex.c |