[vlc-devel] [vlc-commits] d3d11: Add a missing "extern" for a variable declaration

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 6 06:48:42 CEST 2018


LGTM although the variable is only used statically in one file so it 
should be removed from the header. There are helper functions to compile 
one or the other vertex shader.


On 03/08/2018 22:14, Martin Storsjö wrote:
> vlc | branch: master | Martin Storsjö <martin at martin.st> | Fri Aug  3 23:13:10 2018 +0300| [c455866ff0c0113de4ee02bacece73b2f9938143] | committer: Martin Storsjö
>
> d3d11: Add a missing "extern" for a variable declaration
>
> If the "extern" is skipped, the declaration turns into a definition
> of uninitialized data, which can be silently overridden by an
> initialized definition. But here a plain declaration is what is
> intended.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c455866ff0c0113de4ee02bacece73b2f9938143
> ---
>
>   modules/video_output/win32/d3d11_shaders.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/video_output/win32/d3d11_shaders.h b/modules/video_output/win32/d3d11_shaders.h
> index 72526a135f..8ef7c0f3ac 100644
> --- a/modules/video_output/win32/d3d11_shaders.h
> +++ b/modules/video_output/win32/d3d11_shaders.h
> @@ -72,8 +72,8 @@ typedef struct {
>       FLOAT Projection[4*4];
>   } VS_PROJECTION_CONST;
>   
> -const char* globVertexShaderFlat;
> -const char* globVertexShaderProjection;
> +extern const char* globVertexShaderFlat;
> +extern const char* globVertexShaderProjection;
>   
>   /* Vertex Shader compiled sructures */
>   typedef struct {
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits



More information about the vlc-devel mailing list