PDA

View Full Version : warning: unused variable Geant4.10.01.p02



medoo2
August 5th, 2015, 10:01 PM
Hello everybody

I have faced issue I do not know if someone has experienced such issue

it was ....


/src/PhysicsList.cc: In member function ‘void PhysicsList::ConstructEM()’:
/src/PhysicsList.cc:224:12: warning: unused variable ‘EnergyLimit’ [-Wunused-variable]
G4double EnergyLimit = 9.9*MeV;
^
/src/PhysicsList.cc:227:12: warning: unused variable ‘massFactor’ [-Wunused-variable]
G4double massFactor = 1.0079/4.0026;
^
/src/PhysicsList.cc:266:1: error: a function-definition is not allowed here before ‘{’ token
{ }
^
/src/PhysicsList.cc:271:1: error: a function-definition is not allowed here before ‘{’ token
{
^
/src/PhysicsList.cc:286:1: error: expected ‘}’ at end of input
}
^

any thoughts please .

thanks

medoo2
August 6th, 2015, 02:20 AM
/src/PhysicsList.cc: In member function ‘void PhysicsList::ConstructEM()’:
/src/PhysicsList.cc:224:12: warning: unused variable ‘EnergyLimit’ [-Wunused-variable]
G4double EnergyLimit = 9.9*MeV;
^
/src/PhysicsList.cc:227:12: warning: unused variable ‘massFactor’ [-Wunused-variable]
G4double massFactor = 1.0079/4.0026;
^
/src/PhysicsList.cc:266:1: error: a function-definition is not allowed here before ‘{’ token
{ }
^
/src/PhysicsList.cc:271:1: error: a function-definition is not allowed here before ‘{’ token
{
^
/src/PhysicsList.cc:286:1: error: expected ‘}’ at end of input