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

Martin Storsjö git at videolan.org
Wed Sep 30 09:15:25 CEST 2020


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Fri Aug  3 23:13:10 2018 +0300| [40289cf6cbbeadd22afd1a0269074100356554b9] | 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.

(cherry picked from commit c455866ff0c0113de4ee02bacece73b2f9938143)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=40289cf6cbbeadd22afd1a0269074100356554b9
---

 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 0d72e2875e..e8c8033477 100644
--- a/modules/video_output/win32/d3d11_shaders.h
+++ b/modules/video_output/win32/d3d11_shaders.h
@@ -73,8 +73,8 @@ typedef struct {
     FLOAT Projection[4*4];
 } VS_PROJECTION_CONST;
 
-const char* globVertexShaderFlat;
-const char* globVertexShaderProjection;
+extern const char* globVertexShaderFlat;
+extern const char* globVertexShaderProjection;
 
 ID3DBlob* D3D11_CompileShader(vlc_object_t *, const d3d11_handle_t *, const d3d11_device_t *,
                               const char *psz_shader, bool pixel);



More information about the vlc-commits mailing list