title: How to initialize to NULL a 2D array of pointer structs in C?
body: <p>I have the following struct:</p>
  
  <pre><code>typedef void (*HSM_State_Fcn)(void*, size_t);
  typedef HSM_State_Fcn HSM_Dest_State_Fcn;
  typedef uint8_t (*HSM_Guard_Fcn)(void*, size_t);
  typedef void (*HSM_Action_Fcn)(void*, size_t);
  
  typedef struct HSM_Transition_Tag
  {
      HSM_Dest_State_Fcn dest_fcn;
      HSM_Guard_Fcn      guard_fcn;
      HSM_Action_Fcn     action_fcn;
  }HSM_Transition_T;
  </code></pre>
  
  <p>And I have the following 2D array that I want every element to be <code>NULL</code>:</p>
  
  <pre><code>static HSM_Transition_T Transition_Table_Array_Test[3][3] = {NULL};
  </code></pre>
  
  <p>As you can see I tried to equal to <code>{NULL}</code> but I get the following warning:</p>
  
  <p><b>warning: (near initialization for 'Transition_Table_Array_Test[0]') [-Wmissing-braces]</b></p>
  
  <p>What would be the correct approach to initialize every element to <code>NULL</code>?</p>
  
  <p>If I make it:</p>
  
  <pre><code>static HSM_Transition_T Transition_Table_Array_Test[3][3] = {{NULL}};
  </code></pre>
  
  <p>I get the same error.</p>