[PATCH] Unchecked return value error in fdt_rw.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I filed an issue on github, but I was told it'd be good to send this to
the mailing list as well.

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 

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, parentoffsetm &nextoffset);
assert(status == 0);

For this patch, I just put the "(void)" statement in front of the
function call, and it achieves the same results. Could this be put in?
We don't want to deviate from our upstream codebases, but we would also
like to get rid of these errors.


Ryan Long (1):
  fdt_rw.c: Fix Unchecked return value error

 cpukit/dtc/libfdt/fdt_rw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux