[PATCH] testsuites/flashdev01: Use correct page_size type

Chris Johns chrisj at rtems.org
Fri Jun 9 23:15:54 UTC 2023


OK

Thanks
Chris

On 10/6/2023 2:15 am, Kinsey Moore wrote:
> The page size ioctl requires an int pointer to retrieve the page size.
> The test currently uses a size_t which mostly works fine for systems
> where size_t and int are the same size, but can leave junk data in the
> upper bits when they differ in size causing an assert in the test to
> fail in some cases. This updates the variable to the correct type.
> ---
>  testsuites/libtests/flashdev01/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testsuites/libtests/flashdev01/init.c b/testsuites/libtests/flashdev01/init.c
> index 8896ad796c..6ce9709496 100644
> --- a/testsuites/libtests/flashdev01/init.c
> +++ b/testsuites/libtests/flashdev01/init.c
> @@ -57,7 +57,7 @@ static void run_test(void) {
>    rtems_flashdev_ioctl_page_info pg_info;
>    rtems_flashdev_region region;
>    uint32_t jedec;
> -  size_t page_count;
> +  int page_count;
>    int type;
>    size_t wb_size;
>  


More information about the devel mailing list