]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mchview.cxx
Fixing Coverity UNINIT defect
[u/mrichter/AliRoot.git] / MUON / mchview.cxx
index 557d67e5453d8fa7fcd2ef05975a511bd45f34f4..ae032703e04ffa2b8d27ea3ab0ab30b7724c92e8 100644 (file)
@@ -71,8 +71,8 @@ int main(int argc, char** argv)
   
   TObjArray filesToOpen;
   Bool_t isGeometryFixed(kFALSE);
-  Int_t gix, giy;
-  Int_t gox,goy;
+  Int_t gix(0),giy(0);
+  Int_t gox(0),goy(0);
   Bool_t ASCIImapping(kFALSE);
   TString defaultOCDB("local://$ALICE_ROOT/OCDB");
   
@@ -162,20 +162,16 @@ int main(int argc, char** argv)
   gStyle->SetPalette(n+2,colors);
   delete[] colors;
 
-  UInt_t w(0);
-  UInt_t h(0);
-  UInt_t ox(0);
-  UInt_t oy(0);
+  AliMUONMchViewApplication* theApp(0x0);
 
   if ( isGeometryFixed )
   {
-    w = gix;
-    h = giy;
-    ox = gox;
-    oy = goy;
+    theApp = new AliMUONMchViewApplication("mchview", &argc, argv,gix,giy,gox,goy);
+  }
+  else
+  {
+    theApp = new AliMUONMchViewApplication("mchview",&argc,argv);
   }
-  
-  AliMUONMchViewApplication* theApp = new AliMUONMchViewApplication("mchview", &argc, argv, w,h,gox,goy);
    
   TIter next(&filesToOpen);
   TObjString* s;