libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] [PATCH] Fix gcc warnings


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] [PATCH] Fix gcc warnings
Date: Wed, 22 Mar 2023 18:29:33 -0400

I hope this is obvious but I'll say it anyway. I do not have any comment on
the patches, and you should feel free to merge whenever you and Thomas are
mutually satisfied.

When the dust settles, if you all think we need to do a release I can do
that.

On Wed, Mar 22, 2023 at 5:10 PM Pete Batard <pbatard@gmail.com> wrote:

> gcc 12.2.0 on MinGW produces multiple warnings similar to the one below:
>   In function 'iso9660_set_dtime',
>       inlined from 'iso9660_dir_add_entry_su' at iso9660.c:782:3:
>   iso9660.c:353:44: warning: 'temp_tm.tm_isdst' may be used uninitialized
> [-Wmaybe-uninitialized]
>     353 |     time_zone = (p_tm->tm_isdst > 0) ? -60 : 0;
>         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> This patch initializes the temp_tm structure to silence them.
> ---
>  lib/iso9660/iso9660.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/iso9660/iso9660.c b/lib/iso9660/iso9660.c
> index ae4edda3..06e7554e 100644
> --- a/lib/iso9660/iso9660.c
> +++ b/lib/iso9660/iso9660.c
> @@ -721,7 +721,7 @@ iso9660_dir_add_entry_su(void *dir,
>    unsigned int offset = 0;
>    uint32_t dsize = from_733(idr->size);
>    int length, su_offset;
> -  struct tm temp_tm;
> +  struct tm temp_tm = { 0 };
>    cdio_assert (sizeof(iso9660_dir_t) == 33);
>
>    if (!dsize && !idr->length)
> --
> 2.39.1.windows.1
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]