[PATCH 5/5] wined3d: Fix an uninitialised variable warning.
cdavis at codeweavers.com
Tue May 5 19:30:07 CDT 2020
May 5, 2020 12:29 PM, "Henri Verbeet" <hverbeet at gmail.com> wrote:
> On Tue, 5 May 2020 at 17:17, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
>> @@ -257,7 +257,7 @@ static void context_dump_fbo_attachment(const struct wined3d_gl_info *gl_info,
>> GLint type, name, samples, width, height, old_texture, level, face, fmt, tex_target;
>> - const char *tex_type_str;
>> + const char *tex_type_str = NULL;
>> unsigned int i;
>> gl_info->fbo_ops.glGetFramebufferAttachmentParameteriv(target, attachment,
>> @@ -310,8 +310,6 @@ static void context_dump_fbo_attachment(const struct wined3d_gl_info *gl_info,
>> - tex_type_str = NULL;
>> for (i = 0; i < ARRAY_SIZE(texture_type); ++i)
>> if (!gl_info->supported[texture_type[i].extension])
> This is fine, but I have to wonder, are you using an unusual compiler
> or compile flags? The code doesn't seem all that complicated, and at
> least my version of gcc is able to figure out that the variable is
> initialised on all paths.
So is my version of Clang; otherwise, I would've sent something like this myself.
More information about the wine-devel