From: Eder Zulian <ezulian@redhat.com>
To: linux-rt-users@vger.kernel.org
Cc: jkacur@redhat.com, williams@redhat.com, Eder Zulian <ezulian@redhat.com>
Subject: [PATCH v2] rt-tests: cyclictest: Remove warnings due different signedness in comparison
Date: Fri, 11 Aug 2023 17:42:47 +0200 [thread overview]
Message-ID: <20230811154247.481194-1-ezulian@redhat.com> (raw)
Type casting used to remove compiler warnings due to comparison of
integer expressions of different signedness.
Signed-off-by: Eder Zulian <ezulian@redhat.com>
---
v2: Cleaned up coding style and addressed review comments
src/cyclictest/cyclictest.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 4a7108e..179ae8b 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -317,8 +317,10 @@ static int raise_soft_prio(int policy, const struct sched_param *param)
return err;
}
- soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? policy_max : rlim.rlim_cur;
- hard_max = (rlim.rlim_max == RLIM_INFINITY) ? policy_max : rlim.rlim_max;
+ soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? (unsigned int)policy_max
+ : rlim.rlim_cur;
+ hard_max = (rlim.rlim_max == RLIM_INFINITY) ? (unsigned int)policy_max
+ : rlim.rlim_max;
if (prio > soft_max && prio <= hard_max) {
rlim.rlim_cur = prio;
--
2.39.3
next reply other threads:[~2023-08-11 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 15:42 Eder Zulian [this message]
2023-09-18 15:12 ` [PATCH v2] rt-tests: cyclictest: Remove warnings due different signedness in comparison John Kacur
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=20230811154247.481194-1-ezulian@redhat.com \
--to=ezulian@redhat.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).