title: Narrowing Conversion of unsigned int to short unsigned int
body: <blockquote>
    <p>warning: narrowing conversion of '(stride * 4u)' from 'unsigned int' to 'WORD {aka short unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]</p>
  </blockquote>
  
  <p>I cannot figure out why I am getting this warning compiling the following code from MinGW:</p>
  
  <pre><code>unsigned stride = 3;
  
  D3DVERTEXELEMENT9 NORMALELEMENT =
  { 0, stride * sizeof(gs_scalar), D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 };
  if (useNormals) stride += 3;
  </code></pre>
  
  <p>It is complaining about the <code>stride * sizeof(gs_scalar)</code> (gs_scalar is <code>float</code>) inside those braces, but I do not see how this is a narrowing conversion since <code>sizeof</code> returns the number of bytes. I tried changing <code>stride</code>'s data type to WORD, DWORD, CHAR, everything, but I keep getting the same or similar warning.</p>