Message ID | 20240506200600.47895-1-pvorel@suse.cz |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] tst_test.h: Turn 1 bit tst_test members to unsigned | expand |
On Tue, May 7, 2024 at 4:06 AM Petr Vorel <pvorel@suse.cz> wrote: > 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> > Reviewed-by: Li Wang <liwang@redhat.com> --- > 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 > >
Hi Li, thanks for your review, merged! Kind regards, Petr
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;
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(-)