DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org,
	Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
	Dmitry Malloy <dmitrym@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>
Subject: Re: [PATCH] eal/windows: resolve conversion and truncation warnings
Date: Thu, 3 Aug 2023 01:29:00 +0300	[thread overview]
Message-ID: <20230803012900.57b9cb78@sovereign> (raw)
In-Reply-To: <1691009302-32551-1-git-send-email-roretzla@linux.microsoft.com>

2023-08-02 13:48 (UTC-0700), Tyler Retzlaff:
> * Initialize const int NS_PER_SEC with an integer literal instead of
>   double thereby avoiding implicit conversion from double to int.
> 
> * Cast the result of the expression assigned to timspec.tv_nsec to long.

Typo: "timespec".

>   Windows builds generate integer truncation warning for this assignment
>   since the result of the expression was 8 bytes (LONGLONG) but
>   on Windows targets is 4 bytes.

Probably "but **tv_nsec** on Windows targets is 4 bytes".

>   The value produced for the expression should safely fit in the long.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  lib/eal/windows/include/rte_os_shim.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

  reply	other threads:[~2023-08-02 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 20:48 Tyler Retzlaff
2023-08-02 22:29 ` Dmitry Kozlyuk [this message]
2023-08-02 22:41   ` Tyler Retzlaff
2023-08-02 23:44     ` Dmitry Kozlyuk
2023-08-03  0:30       ` Tyler Retzlaff
2024-03-07 18:34 ` [PATCH v2] " Tyler Retzlaff
2024-03-07 20:53   ` Bruce Richardson
2024-03-07 20:57     ` Tyler Retzlaff

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=20230803012900.57b9cb78@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=dmitrym@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=roretzla@linux.microsoft.com \
    /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).