[PATCH] qcap/tests: Initialize time to 1 in test_seeking() to avoid test failures.

Zebediah Figura z.figura12 at gmail.com
Mon Jul 20 11:11:25 CDT 2020


On 7/20/20 10:59 AM, Gijs Vermeulen wrote:
> Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
> ---
>  dlls/qcap/tests/avimux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c
> index 572314f8ab..9f0f593afc 100644
> --- a/dlls/qcap/tests/avimux.c
> +++ b/dlls/qcap/tests/avimux.c
> @@ -667,7 +667,7 @@ static void test_enum_media_types(void)
>  static void test_seeking(void)
>  {
>      IBaseFilter *filter = create_avi_mux();
> -    LONGLONG time, current, stop;
> +    LONGLONG current, stop, time = 1;
>      IMediaSeeking *seeking;
>      unsigned int i;
>      GUID format;
> 

I think I'd prefer that the relevant tests be guarded with "if (hr ==
S_OK)". In general I tend to be of the opinion that use of an
uninitialized variable is a bug better solved not by initializing the
variable (even if the compiler is just confused, often the code can be
restructured more idiomatically).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200720/9a5a7db6/attachment-0001.sig>


More information about the wine-devel mailing list