[PATCH] cpukit/dosfs: Cast away ignored return

Joel Sherrill joel at rtems.org
Thu Jan 4 23:04:20 UTC 2024


Don't we put a space after the (void)?

On Thu, Jan 4, 2024 at 12:55 PM Kinsey Moore <kinsey.moore at oarcorp.com>
wrote:

> An error is already being reported. Checking the return value of this
> function is not useful.
> ---
>  cpukit/libfs/src/dosfs/msdos_file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpukit/libfs/src/dosfs/msdos_file.c
> b/cpukit/libfs/src/dosfs/msdos_file.c
> index d142968337..6728a960aa 100644
> --- a/cpukit/libfs/src/dosfs/msdos_file.c
> +++ b/cpukit/libfs/src/dosfs/msdos_file.c
> @@ -179,7 +179,7 @@ msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
>                               length,
>                               &new_length);
>          if (rc == RC_OK && length != new_length) {
> -            fat_file_truncate(&fs_info->fat, fat_fd, old_length);
> +            (void)fat_file_truncate(&fs_info->fat, fat_fd, old_length);
>              errno = ENOSPC;
>              rc = -1;
>          }
> --
> 2.39.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240104/d753d660/attachment.htm>


More information about the devel mailing list