From: Jan Beulich <jbeulich@suse.com>
To: Dmytro Prokopchuk1 <dmytro_prokopchuk1@epam.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Rahul Singh" <rahul.singh@arm.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [XEN PATCH v3] misra: address violation of MISRA C Rule 10.1
Date: Mon, 14 Jul 2025 15:54:40 +0200 [thread overview]
Message-ID: <01ae5bd5-efbe-4f7e-baff-cf62ae2c8501@suse.com> (raw)
In-Reply-To: <6682eaad85976a14dd84339574043ef0336cc09c.1752498860.git.dmytro_prokopchuk1@epam.com>
On 14.07.2025 15:26, Dmytro Prokopchuk1 wrote:
> --- a/xen/common/time.c
> +++ b/xen/common/time.c
> @@ -84,7 +84,7 @@ struct tm gmtime(unsigned long t)
> }
> tbuf.tm_year = y - 1900;
> tbuf.tm_yday = days;
> - ip = (const unsigned short int *)__mon_lengths[__isleap(y)];
> + ip = (const unsigned short int *)__mon_lengths[__isleap(y) ? 1 : 0];
Oh, and: This cast is one of the more dangerous ones, and afaict it's entirely
pointless. When touching this line, I think the cast would want removing at the
same time.
Jan
prev parent reply other threads:[~2025-07-14 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 13:26 [XEN PATCH v3] misra: address violation of MISRA C Rule 10.1 Dmytro Prokopchuk1
2025-07-14 13:49 ` Jan Beulich
2025-07-14 14:16 ` Nicola Vetrini
2025-07-14 14:52 ` Jan Beulich
2025-07-14 13:54 ` Jan Beulich [this message]
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=01ae5bd5-efbe-4f7e-baff-cf62ae2c8501@suse.com \
--to=jbeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=dmytro_prokopchuk1@epam.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=rahul.singh@arm.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.