public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] tst_test.h: Turn 1 bit tst_test members to unsigned
@ 2024-05-06 20:06 Petr Vorel
  2024-05-07  1:25 ` Li Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2024-05-06 20:06 UTC (permalink / raw)
  To: ltp

This fixes clang warning:

    test22.c:33:17: warning: implicit truncation from 'int' to a one-bit
    wide bit-field changes value from 1 to -1
    [-Wsingle-bit-bitfield-constant-conversion]

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/tst_test.h | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/include/tst_test.h b/include/tst_test.h
index be09bce27..69587917f 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -476,26 +476,26 @@ struct tst_ulimit_val {
 
 	const char *tconf_msg;
 
-	int needs_tmpdir:1;
-	int needs_root:1;
-	int forks_child:1;
-	int needs_device:1;
-	int needs_checkpoints:1;
-	int needs_overlay:1;
-	int format_device:1;
-	int mount_device:1;
-	int needs_rofs:1;
-	int child_needs_reinit:1;
-	int needs_devfs:1;
-	int restore_wallclock:1;
-
-	int all_filesystems:1;
-
-	int skip_in_lockdown:1;
-	int skip_in_secureboot:1;
-	int skip_in_compat:1;
-
-	int needs_hugetlbfs:1;
+	unsigned int needs_tmpdir:1;
+	unsigned int needs_root:1;
+	unsigned int forks_child:1;
+	unsigned int needs_device:1;
+	unsigned int needs_checkpoints:1;
+	unsigned int needs_overlay:1;
+	unsigned int format_device:1;
+	unsigned int mount_device:1;
+	unsigned int needs_rofs:1;
+	unsigned int child_needs_reinit:1;
+	unsigned int needs_devfs:1;
+	unsigned int restore_wallclock:1;
+
+	unsigned int all_filesystems:1;
+
+	unsigned int skip_in_lockdown:1;
+	unsigned int skip_in_secureboot:1;
+	unsigned int skip_in_compat:1;
+
+	unsigned int needs_hugetlbfs:1;
 
 	const char *const *skip_filesystems;
 
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2024-05-07  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 20:06 [LTP] [PATCH 1/1] tst_test.h: Turn 1 bit tst_test members to unsigned Petr Vorel
2024-05-07  1:25 ` Li Wang
2024-05-07  7:43   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox