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

Martin Storsjö git at videolan.org
Fri Aug 3 22:14:33 CEST 2018


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 {



More information about the vlc-commits mailing list