linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/17] rt-tests: cyclictest: Remove warnings due different signedness in comparison
@ 2023-10-06 18:39 John Kacur
  2023-10-06 18:39 ` [PATCH 02/17] rt-tests: cyclictest: Suppress unused parameters warning John Kacur
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: John Kacur @ 2023-10-06 18:39 UTC (permalink / raw)
  To: RT; +Cc: Clark Williams, Eder Zulian, John Kacur

From: Eder Zulian <ezulian@redhat.com>

Type casting used to remove compiler warnings due to comparison of
integer expressions of different signedness.

Signed-off-by: Eder Zulian <ezulian@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
 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 4a7108ea2c8f..179ae8b2004b 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.40.1


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

end of thread, other threads:[~2023-10-06 18:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 18:39 [PATCH 01/17] rt-tests: cyclictest: Remove warnings due different signedness in comparison John Kacur
2023-10-06 18:39 ` [PATCH 02/17] rt-tests: cyclictest: Suppress unused parameters warning John Kacur
2023-10-06 18:39 ` [PATCH 03/17] rt-tests: ssdd: " John Kacur
2023-10-06 18:39 ` [PATCH 04/17] rt-tests: queuelat: " John Kacur
2023-10-06 18:39 ` [PATCH 05/17] rt-tests: cyclicdeadline: Suppress unused parameter warning John Kacur
2023-10-06 18:40 ` [PATCH 06/17] rt-tests: svsematest: Suppress unused paramters warning John Kacur
2023-10-06 18:40 ` [PATCH 07/17] rt-tests: pip_stress: Removed unused parameter John Kacur
2023-10-06 18:40 ` [PATCH 08/17] rt-tests: sigwaittest: Fix some warnings John Kacur
2023-10-06 18:40 ` [PATCH 09/17] rt-tests: rt-migrate-test: " John Kacur
2023-10-06 18:40 ` [PATCH 10/17] rt-tests: signaltest Fix unused parameter warning John Kacur
2023-10-06 18:40 ` [PATCH 11/17] rt-tests: cyclicdeadline: Fix comparison of different signedness John Kacur
2023-10-06 18:40 ` [PATCH 12/17] rt-tests: cyclictest: " John Kacur
2023-10-06 18:40 ` [PATCH 13/17] rt-tests: rt-utils: Suppress warnings about fallthrough John Kacur
2023-10-06 18:40 ` [PATCH 14/17] rt-tests: rt-numa: Fix comparison of different signedness John Kacur
2023-10-06 18:40 ` [PATCH 15/17] rt-tests: pi_stress: Fix various warnings John Kacur
2023-10-06 18:40 ` [PATCH 16/17] rt-tests: pmqtest: " John Kacur
2023-10-06 18:40 ` [PATCH 17/17] rt-tests: ptsematest: Fix unused paramter warnings John Kacur

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