From: Ryan Long <thisisryanlong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Ryan Long <ryan.long-lGxtRh3/QYtBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH] Unchecked return value error in fdt_rw.c
Date: Mon, 1 Mar 2021 17:24:09 -0500 [thread overview]
Message-ID: <1614637450-4972-1-git-send-email-ryan.long@oarcorp.com> (raw)
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
next reply other threads:[~2021-03-01 22:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 22:24 Ryan Long [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1614637450-4972-1-git-send-email-ryan.long@oarcorp.com \
--to=thisisryanlong-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ryan.long-lGxtRh3/QYtBDgjK7y7TUQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).