[LTP] [PATCH 1/2] mq_timedreceive01: Fix different signedness error on 32bit

Petr Vorel
2024-11-12T17:19:04Z

warning: comparison of integer expressions of different signedness:
‘unsigned int’ and ‘long int’ [-Wsign-compare].

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
index 3870b4087a..d4f447d047 100644
--- a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
+++ b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
@@ -183,7 +183,7 @@ static void do_test(unsigned int i)
return;
}

- if (tc->len != TST_RET) {
+ if ((long)tc->len != TST_RET) {
tst_res(TFAIL, "mq_timedreceive() wrong length %ld, expected %u",
TST_RET, tc->len);
return;
--
2.47.0