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

Martin Storsjö martin at martin.st
Sat Aug 4 11:20:37 CEST 2018

On Sat, 4 Aug 2018, Rémi Denis-Courmont wrote:

> Le perjantaina 3. elokuuta 2018, 23.14.33 EEST Martin Storsjö a écrit :
>> 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,
> Err no. ISO C requires that statically allocated variables are always 
> initialized, unlike automatic ones. By default, initialization is zero. In 
> these specific cases, the pointers were NULL.

Yes, sorry, my terminology was a bit imprecise. I meant the difference 
between "int foo;" which creates a weak zero initialized symbol, while 
"int foo = 0;" which creates a strong symbol. And I guess this distinction 
only is a GCCism, not from any language standard.

// Martin

More information about the vlc-devel mailing list