Message: How do I efficiently surpress unused variable warning caused by physical volumes? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question How do I efficiently surpress unused variable warning caused by physical volumes? 

Forum: Geometry
Date: 08 Feb, 2016
From: Alex Leatherland <Alex Leatherland>

During compling I see a lot of [-Wunused-but-set-variable] warning messages caused by physical volumes in my detector construction. For example.

   warning: variable 'myvol_phys' set but not used [-Wunused-but-set-variable]

How do I stop this happening?

More specifically, how do I stop this without:
   A) Inserting a dummy function after every "myvol_phys = new PVP..."
   B) Using a vector when building my geometry "physvec.push_back(new PVP...)"

Normally this is not an issue, but occassionally a screenful of harmless warning messages makes finding that one complier error message line annoying to find.

Best regards,

Alex Leatherland

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: How do I efficiently surpress unused variable warning caused by physical volumes?   (Michael H. Kelsey - 08 Feb, 2016)
 Add Message Add Message
to: "How do I efficiently surpress unused variable warning caused by physical volumes?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]