title: Fixing a -Werror=unused-but-set-variable
body: <p>This might be a silly question but I can't solve this without adding a print statement.</p>
  
  <p>Here is my code </p>
  
  <pre><code>        double best_mother_index = 0;
          double best_mother_energy = -9999;
          double best_mother_plane = -99;
  
          for(size_t p=0; p&lt; marks_mother_vector.size(); p++)
          {
             art::Ptr&lt;simb::MCParticle&gt; mother = marks_mother_vector[p];
             std::vector&lt;double&gt; mother_energy_recod = marks_mother_energy_fraction_map[mother];
  
             if( mother_energy_recod[0] &gt; best_mother_energy){
                  best_mother_index = p;
                  best_mother_energy = mother_energy_recod[0];
                  best_mother_plane = 0;
             }
             if (mother_energy_recod[1] &gt; best_mother_energy){
                  best_mother_index = p;
                  best_mother_energy = mother_energy_recod[1];
                  best_mother_plane = 1;
             }
             if( mother_energy_recod[2] &gt; best_mother_energy){
                  best_mother_index = p;
                  best_mother_energy = mother_energy_recod[2];
                  best_mother_plane = 2;
             }
          }
  
  i get the following error message when compiling
  
  :9: error: variable ‘best_mother_plane’ set but not used [-Werror=unused-but-set-variable]
    double best_mother_plane = -99;
  
  </code></pre>
  
  <p>why is that the only variable with a problem?
  How can I solve this?</p>