From d2b2e698a66ab757593d0c0e2dcfe74809f94a0d Mon Sep 17 00:00:00 2001 From: laphecet Date: Tue, 28 Sep 2010 18:36:14 +0000 Subject: [PATCH] Fixing Coverity UNINIT defect --- MUON/AliMUONMchViewApplication.cxx | 2 +- MUON/mchview.cxx | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/MUON/AliMUONMchViewApplication.cxx b/MUON/AliMUONMchViewApplication.cxx index 93d1bd75f8b..fc6e152a87d 100644 --- a/MUON/AliMUONMchViewApplication.cxx +++ b/MUON/AliMUONMchViewApplication.cxx @@ -87,7 +87,7 @@ AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name, /// (w,h) is the size in pixel (if 0,0 it will be computed as 70%,90% of display size) /// (ox,oy) is the offset from the top-left of the display - if (!w | !h) + if (!w || !h) { w = (UInt_t)(gClient->GetDisplayWidth()*0.7); h = (UInt_t)(gClient->GetDisplayHeight()*0.9); diff --git a/MUON/mchview.cxx b/MUON/mchview.cxx index 557d67e5453..ae032703e04 100644 --- a/MUON/mchview.cxx +++ b/MUON/mchview.cxx @@ -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; -- 2.39.3