devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Unchecked return value error in fdt_rw.c
@ 2021-03-01 22:24 Ryan Long
       [not found] ` <1614637450-4972-1-git-send-email-ryan.long-lGxtRh3/QYtBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Long @ 2021-03-01 22:24 UTC (permalink / raw)
  To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA; +Cc: Ryan Long

Hi,

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

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.

Thanks,
Ryan

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(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-03  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01 22:24 [PATCH] Unchecked return value error in fdt_rw.c Ryan Long
     [not found] ` <1614637450-4972-1-git-send-email-ryan.long-lGxtRh3/QYtBDgjK7y7TUQ@public.gmane.org>
2021-03-01 22:24   ` [PATCH] fdt_rw.c: Fix Unchecked return value error Ryan Long
     [not found]     ` <1614637450-4972-2-git-send-email-ryan.long-lGxtRh3/QYtBDgjK7y7TUQ@public.gmane.org>
2021-03-02  2:26       ` Rob Herring
2021-03-02  2:29   ` [PATCH] Unchecked return value error in fdt_rw.c Rob Herring
     [not found]     ` <CAL_JsqK68HjwdT5+-kjo3Yr7XokC=6ioa7dkMzeUsve8iEzVxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-03-03  8:33       ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).