From 75f801feaf88f5b54dd1c87f147cd8167ebc6cc6 Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Tue, 17 May 2016 14:50:37 +0200
Subject: [PATCH] 'Fix typo (coverity 30950).' (LWHists-00-06-19)

2016-05-17  scott snyder  <snyder@bnl.gov>

	* Tagging LWHists-00-06-19.
	* src/tests/comphistfiles/comphistpars.h: Fix typo (coverity
	30950).

2016-04-13  scott snyder  <snyder@bnl.gov>

	* Tagging LWHists-00-06-18.
	* Fix cppcheck warnings.

2016-02-27 Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
	* Adding a hand-written CMakeLists.txt file to the package,
	  in order to build its library and executables correctly.
	* Tagging as LWHists-00-06-17


Former-commit-id: 82012646361771e065091d5ad1c07371733b3210
---
 Tools/LWHists/CMakeLists.txt                  | 44 +++++++++++++++++++
 Tools/LWHists/src/preload/rootspy.cxx         |  2 +-
 .../src/tests/comphistfiles/comphistpars.h    |  2 +-
 3 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 Tools/LWHists/CMakeLists.txt

diff --git a/Tools/LWHists/CMakeLists.txt b/Tools/LWHists/CMakeLists.txt
new file mode 100644
index 00000000000..fe6b782945b
--- /dev/null
+++ b/Tools/LWHists/CMakeLists.txt
@@ -0,0 +1,44 @@
+# $Id: CMakeLists.txt 726579 2016-02-27 10:29:14Z krasznaa $
+################################################################################
+# Package: LWHists
+################################################################################
+
+# Declare the package name:
+atlas_subdir( LWHists )
+
+# External dependencies:
+find_package( ROOT COMPONENTS Hist RIO Core )
+
+# To let valgrind look for problems:
+#add_definitions( -DLW_DEBUG_POOLS_USE_NEW )
+
+# To make the pools monitor acquire/release ("mini-valgrind"):
+#add_definitions( -DLW_DEBUG_POOLS_DEBUG_USAGE )
+
+# Jump through extra hoops to reproduce obscure ROOT behaviour:
+add_definitions( -DLW_STRICT_ROOT_BEHAVIOUR )
+
+# To find users who really maybe shouldn't use LW histograms:
+#add_definitions( -DLW_DEBUG_HEAVY_USERS )
+
+# To compile an extra symbol for better ROOTSPY performance:
+#add_definitions( -DLW_DEBUG_ROOTSPY_SYMB )
+
+# The package's main library:
+atlas_add_library( LWHists src/*.cxx
+  PUBLIC_HEADERS LWHists
+  PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+
+# Executables in the package:
+atlas_add_executable( lwhists_validate src/tests/validation/*.cxx
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES ${ROOT_LIBRARIES} LWHists )
+
+atlas_add_executable( lwhists_benchmark src/tests/benchmarking/*.cxx
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES ${ROOT_LIBRARIES} LWHists )
+
+atlas_add_executable( lwhists_comphistfiles src/tests/comphistfiles/*.cxx
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES ${ROOT_LIBRARIES} )
diff --git a/Tools/LWHists/src/preload/rootspy.cxx b/Tools/LWHists/src/preload/rootspy.cxx
index ddce4092f8f..ee9183f9143 100644
--- a/Tools/LWHists/src/preload/rootspy.cxx
+++ b/Tools/LWHists/src/preload/rootspy.cxx
@@ -100,7 +100,7 @@ namespace RootSpy {
   }
 
   struct logitem {
-    explicit logitem(bool indirect):hash(0),ntrace(0),traceoffset(indirect?1:0){}
+    explicit logitem(bool indirect):hash(0),ntrace(0),trace(),traceoffset(indirect?1:0){}
     unsigned hash;
     static const unsigned ntracemax=8;
     unsigned ntrace;
diff --git a/Tools/LWHists/src/tests/comphistfiles/comphistpars.h b/Tools/LWHists/src/tests/comphistfiles/comphistpars.h
index 706b3aa2c2b..c5858563353 100644
--- a/Tools/LWHists/src/tests/comphistfiles/comphistpars.h
+++ b/Tools/LWHists/src/tests/comphistfiles/comphistpars.h
@@ -234,7 +234,7 @@ bool checkParameters(TH1*h1,TH1*h2)
     REPORT("Incompatible fXaxis");
     return false;
   }
-  if (!axisCompatible(h1->GetXaxis(), h2->GetYaxis())) {
+  if (!axisCompatible(h1->GetXaxis(), h2->GetXaxis())) {
     REPORT("Incompatible fXaxis");
     return false;
   }
-- 
GitLab