You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RTEMS (RTEMS.org) is a free single process, multi-threaded real-time operating system with a long history. Your dtc toolchain has been incorporated into RTEMS. The RTEMS Project is a member of the Coverity Scan program and it flagged an issue with /dtc/libfdt/fdt_rw.c. In trying to be good citizens of the wider open source community, the project wants these issues to be reported to the upstream owner along with a fix or suggestions. This is one of those reports.
When Coverity Scan was ran on some of your code, a "Unchecked return value" error was found at line 352 in fdt_rw.c. For similar errors that we received for RTEMS, we created a macro that will assert the value returned and "use" the return value like so.
int status = fdt_next_tag(fdt, parentoffset, &nextoffset);
assert(status == 0);
(void)status;
You can just use the "(void)fdt_next_tag()" if you don't care to check the return value of the functional call at all, but this is just a suggestion.
The text was updated successfully, but these errors were encountered:
We can't use assert() in libfdt, because we it needs to be usable in very constrained environments (like bootloaders) which might not have an assert() (or if they do it might not work like the libc one). Our rough equivalent to assert()s is to return FDT_ERR_INTERNAL.
I'm not sure why our own Coverity didn't pick this one up, but in any case I've made what should be a fix in a somewhat different way.
RTEMS (RTEMS.org) is a free single process, multi-threaded real-time operating system with a long history. Your dtc toolchain has been incorporated into RTEMS. The RTEMS Project is a member of the Coverity Scan program and it flagged an issue with /dtc/libfdt/fdt_rw.c. In trying to be good citizens of the wider open source community, the project wants these issues to be reported to the upstream owner along with a fix or suggestions. This is one of those reports.
When Coverity Scan was ran on some of your code, a "Unchecked return value" error was found at line 352 in fdt_rw.c. For similar errors that we received for RTEMS, we created a macro that will assert the value returned and "use" the return value like so.
You can just use the "(void)fdt_next_tag()" if you don't care to check the return value of the functional call at all, but this is just a suggestion.
The text was updated successfully, but these errors were encountered: