GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Compiler Warnings
icon4.gif  Compiler Warnings [message #20112] Fri, 13 January 2017 15:12 Go to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *dyn.telefonica.de
Dear Developers,

There are a large amount of compiler warnings in our code. Even when disabling "-Weffc++" we were at over 6000 warnings. Several occurring multiple times due to the dependency structure.
I took the liberty to remove some of them. One major haul was submitted yesterday, removing unused variable declarations. Although I paid a lot of attention there may be one or two variables that are not used but their declaration is calling a function that does actual calculations.

Every package responsible should revisit those changes!

Cheers!
Ralf
Re: Compiler Warnings [message #20138 is a reply to message #20112] Wed, 18 January 2017 09:52 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi all.

There is another commit, containing fixes for -Wextra, mainly copy constructor fixes and ignored "const" expressions.

Please note there are not initialized variables in the following files:

  • PndRichHitProducer.cxx
  • PndTrkClaenup.cxx
  • PndGlobalIdealTrackMerger.cxx
  • PndTrkTracking2.cxx

Cheers!
Ralf
Re: Compiler Warnings [message #20194 is a reply to message #20112] Fri, 27 January 2017 11:10 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Dear Developers,

There is a new commit dealing mostly with the order of variable initialization. (2/3 of this part is done).

I want to steer the attention to the following files:

PndSttGeometryMap.cxx: l.227

PndEmc.cxx: l.468
PndEmcStructure.cxx: l.561

---> Here are logical operations not written explicitly with braces. Please revisit this part thoroughly!

Cheers!
Ralf

[Updated on: Fri, 27 January 2017 11:10]

Report message to a moderator

Re: Compiler Warnings [message #20197 is a reply to message #20194] Fri, 27 January 2017 12:51 Go to previous messageGo to next message
Dmitry Morozov is currently offline  Dmitry Morozov
Messages: 34
Registered: May 2007
Location: Protvino, Russia
continuous participant
From: 192.160.233*
Dear Ralf,

do I understand you correclty that "Here are logical operations not written explicitly with braces" is dealing with readability and clearity of reading the code for other developers?

Thank you,
Dmitry.
Re: Compiler Warnings [message #20199 is a reply to message #20197] Fri, 27 January 2017 14:53 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi Dmitry,

This is one aspect. However, I would like to have the developers (is that you?) revisit this special point, because it creates a compiler warning with the "-Wall" flag. I also fear that the logic contains a real bug in this place.

Cheers!
Ralf

[Updated on: Fri, 27 January 2017 14:53]

Report message to a moderator

Re: Compiler Warnings [message #20204 is a reply to message #20199] Mon, 30 January 2017 12:51 Go to previous messageGo to next message
Dmitry Morozov is currently offline  Dmitry Morozov
Messages: 34
Registered: May 2007
Location: Protvino, Russia
continuous participant
From: 192.160.233*
Hi Ralf,

I touched only stuff concerning FSC within these files. I'm not the author of that lines with warnings. This part handles gemetry of Farward Endcap EMC.

Best regards,
Dmitry
Re: Compiler Warnings [message #20661 is a reply to message #20112] Wed, 22 March 2017 08:45 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi Folks,

We're down to 13 Warnings, excluding the thousands from -Weffc++.
I think we don't need to fix the warnings concerning effc++ as it is about having for each class a copy constructor, an assignment operator and to initialize always before the scope of the constructors starts.

From now on we will see the warnings during compilation on our systems, so take care please.

Cheers!
Ralf
Re: Compiler Warnings [message #20663 is a reply to message #20661] Wed, 22 March 2017 09:02 Go to previous message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Great work Ralf!
Previous Topic: EvtGen - time information lost
Next Topic: New PandaRoot Release feb17p1
Goto Forum:
  


Current Time: Thu Mar 28 22:13:40 CET 2024

Total time taken to generate the page: 0.01026 seconds