Skip to content
Snippets Groups Projects
Commit b89703bf authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

Fix coverity reports #32499 & #32500 (uninitialized scalar variables)

git-svn-id: http://root.cern.ch/svn/root/trunk@41272 27541ba8-7e3a-0410-8455-c3a389f83636
parent e7e4b541
No related branches found
No related tags found
No related merge requests found
...@@ -223,7 +223,7 @@ void TQCanvasMenu::Dialog(TObject* object, TMethod* method) ...@@ -223,7 +223,7 @@ void TQCanvasMenu::Dialog(TObject* object, TMethod* method)
} }
else if (!strncmp(basictype, "float", 5) || else if (!strncmp(basictype, "float", 5) ||
!strncmp(basictype, "double", 6)) { !strncmp(basictype, "double", 6)) {
Double_t ddefval; Double_t ddefval = 0.0;
m->GetterMethod()->Execute(object, "", ddefval); m->GetterMethod()->Execute(object, "", ddefval);
snprintf(val, 255, "%g", ddefval); snprintf(val, 255, "%g", ddefval);
} }
...@@ -231,7 +231,7 @@ void TQCanvasMenu::Dialog(TObject* object, TMethod* method) ...@@ -231,7 +231,7 @@ void TQCanvasMenu::Dialog(TObject* object, TMethod* method)
!strncmp(basictype, "int", 3) || !strncmp(basictype, "int", 3) ||
!strncmp(basictype, "long", 4) || !strncmp(basictype, "long", 4) ||
!strncmp(basictype, "short", 5)) { !strncmp(basictype, "short", 5)) {
Long_t ldefval; Long_t ldefval = 0L;
m->GetterMethod()->Execute(object, "", ldefval); m->GetterMethod()->Execute(object, "", ldefval);
snprintf(val, 255, "%li", ldefval); snprintf(val, 255, "%li", ldefval);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment