[PATCH] qcap/tests: Initialize time to 1 in test_seeking() to avoid test failures.
Signed-off-by: Gijs Vermeulen <gijsvrm(a)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; -- 2.27.0
On 7/20/20 10:59 AM, Gijs Vermeulen wrote:
Signed-off-by: Gijs Vermeulen <gijsvrm(a)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).
participants (2)
-
Gijs Vermeulen -
Zebediah Figura