Commit c55d200c47d46c55eb17112ae759ea566f6b94ca

Authored by Jürgen Knödlseder
2 parents b0c28c0a b4fb8da3

Merge branch 'cdeil/compiler_warnings'

Fix some unimportant compiler warnings to have a clean build.
include/GObservationRegistry.hpp
... ... @@ -84,17 +84,17 @@ private:
84 84 static int& number() {
85 85 static int m_number = 0;
86 86 return m_number;
87   - };
  87 + }
88 88 // Model names
89 89 static GRegistryPointer<std::string>& names() {
90 90 static GRegistryPointer<std::string> m_names;
91 91 return m_names;
92   - };
  92 + }
93 93 // Pointer to seed models
94 94 static GRegistryPointer<const GObservation*>& obs() {
95 95 static GRegistryPointer<const GObservation*> m_obs;
96 96 return m_obs;
97   - };
  97 + }
98 98 };
99 99  
100 100  
... ...
inst/cta/include/GCTAModelRadialRegistry.hpp
... ... @@ -83,17 +83,17 @@ private:
83 83 static int& number() {
84 84 static int m_number = 0;
85 85 return m_number;
86   - };
  86 + }
87 87 // Model names
88 88 static GRegistryPointer<std::string>& names() {
89 89 static GRegistryPointer<std::string> m_names;
90 90 return m_names;
91   - };
  91 + }
92 92 // Pointer to seed models
93 93 static GRegistryPointer<const GCTAModelRadial*>& models() {
94 94 static GRegistryPointer<const GCTAModelRadial*> m_models;
95 95 return m_models;
96   - };
  96 + }
97 97 };
98 98  
99 99  
... ...
inst/cta/src/GCTAResponse_helpers.hpp
... ... @@ -343,8 +343,8 @@ public:
343 343 m_srcTime(srcTime),
344 344 m_obs(obs),
345 345 m_rot(rot),
346   - m_sin_rho(sin_rho),
347   - m_cos_rho(cos_rho) { }
  346 + m_cos_rho(cos_rho),
  347 + m_sin_rho(sin_rho) { }
348 348 double eval(const double& omega);
349 349 protected:
350 350 const GCTAResponse& m_rsp; //!< CTA response
... ...
inst/cta/test/test_CTA.cpp
... ... @@ -260,7 +260,7 @@ void TestGCTAResponse::test_response_psf_king(void)
260 260 double r_max = rsp.psf()->delta_max(eng.log10TeV()) * gammalib::rad2deg;
261 261 double r = 0.0;
262 262 double dr = 0.0001;
263   - int steps = int(1.0/dr);
  263 + int steps = int(r_max / dr);
264 264 double sum = 0.0;
265 265 for (int i = 0; i < steps; ++i) {
266 266 r += dr;
... ...
src/linalg/GMatrixSparse.cpp
... ... @@ -3516,7 +3516,7 @@ GMatrixSparse cs_symperm(const GMatrixSparse&amp; matrix, const int* pinv)
3516 3516 * @brief Compute transpose matrix
3517 3517 *
3518 3518 * @param[in] matrix Matrix.
3519   - * @param[in] value Flag that signals if values should be copied.
  3519 + * @param[in] values Flag that signals if values should be copied.
3520 3520 *
3521 3521 * The flag 'values' allows to avoid copying the actual data values. This
3522 3522 * allows to perform a logical matrix transposition, as needed by the
... ...
src/sky/GWcs.cpp
... ... @@ -2194,7 +2194,6 @@ void GWcs::sph_s2x(int nlng, int nlat, int sll, int spt,
2194 2194 for (int ilng = 0; ilng < nlng; ++ilng, rowoff += spt, lngp += sll) {
2195 2195 double dlng = *lngp - m_euler[0];
2196 2196 double* phip = phi + rowoff;
2197   - double* thetap = theta;
2198 2197 for (int ilat = 0; ilat < mlat; ++ilat, phip += rowlen) {
2199 2198 *phip = dlng;
2200 2199 }
... ...
src/test/GTestSuite.cpp
... ... @@ -578,7 +578,7 @@ void GTestSuite::test_try_success(void)
578 578 // If the stack is empty
579 579 if (m_stack_try.empty()) {
580 580 throw GException::test_nested_try_error(G_TRY_SUCCESS,
581   - "Called "G_TRY_SUCCESS" without a previous call to test_try()");
  581 + "Called \"G_TRY_SUCCESS\" without a previous call to test_try()");
582 582 }
583 583  
584 584 // Add test case to test suite
... ...
src/xml/GXml.cpp
... ... @@ -660,7 +660,6 @@ void GXml::parse(const GUrl&amp; url)
660 660 {
661 661 // Initialise parser
662 662 int c;
663   - int index = 0;
664 663 bool in_markup = false;
665 664 bool in_comment = false;
666 665 std::string segment;
... ...
test/test_GFits.cpp
... ... @@ -479,7 +479,6 @@ void TestGFits::test_create(void)
479 479 try {
480 480 GFits fits;
481 481 fits.open("test.fits");
482   - GFitsHDU* hdu = fits.at(0);
483 482 GFitsImageDouble* image = static_cast<GFitsImageDouble*>(fits.at(1));
484 483 int nx = image->naxes(0);
485 484 int ny = image->naxes(1);
... ...
test/test_GXml.cpp
... ... @@ -327,6 +327,7 @@ void TestGXml::test_GXml_access(void)
327 327 // Test node access
328 328 for (int i = 0; i < xml.size(); ++i) {
329 329 GXmlNode* ptr = xml[i];
  330 + test_assert(ptr != 0, "Test node access");
330 331 }
331 332 test_assert(xml.elements() == 1,
332 333 "Test if xml.elements()==1",
... ... @@ -336,6 +337,7 @@ void TestGXml::test_GXml_access(void)
336 337 // Test node access
337 338 for (int i = 0; i < xml.elements(); ++i) {
338 339 GXmlNode* ptr = xml.element(i);
  340 + test_assert(ptr != 0, "Test xml element access");
339 341 }
340 342 test_assert(xml.elements("source_library") == 1,
341 343 "Test if the source_library = 1",
... ...