title: error: X may be used uninitialized in this function in C
body: <p>I am getting this error</p>
  
  <pre><code>error: Access.Core may be used uninitialized in this function
  </code></pre>
  
  <p>And this is my code:</p>
  
  <pre><code> static int FirstTime = 1;
   MyStruct Access;
  
   if (FirstTime) {
     FirstTime = 0;
     Access = Implementation();
     DoSomething(Access);
   }
  
   if(Other_Variable) {
      Access = Implementation2();
      DoSomething(Access);
    }
  
    //The Other_Variable will be set to 1 and to 0 by other part of the code
  </code></pre>
  
  <p>My code is like that because I want to call to the function Implementation only the first time. In every call the Access variable is going to be updated so it does not make many sense make it static.</p>
  
  <p>If I make Access static works, but I do not like make it static because in every other call Access is going to be updated. Any way to avoid the problem without making it static?.</p>
  
  <p>Also any better options to execute only once a function instead of using a static variable are welcome.</p>