Skip to content

Commit

Permalink
- fixed GCC compiler warnings for invalid-pch define and force_inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Walther committed May 18, 2015
1 parent c895e99 commit 20a5a0c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -411,7 +411,7 @@ case SIMCODE(modelInfo=MODELINFO(vars = vars as SIMVARS(__))) then
* Simulation code
*
*****************************************************************************/
VAR_ALIGN_PRE class <%lastIdentOfPath(modelInfo.name)%>Extension: public ISystemInitialization, public IMixedSystem,public IWriteOutput, public IStateSelection, public <%lastIdentOfPath(modelInfo.name)%>WriteOutput, public <%lastIdentOfPath(modelInfo.name)%>Initialize, public <%lastIdentOfPath(modelInfo.name)%>Jacobian,public <%lastIdentOfPath(modelInfo.name)%>StateSelection
class <%lastIdentOfPath(modelInfo.name)%>Extension: public ISystemInitialization, public IMixedSystem,public IWriteOutput, public IStateSelection, public <%lastIdentOfPath(modelInfo.name)%>WriteOutput, public <%lastIdentOfPath(modelInfo.name)%>Initialize, public <%lastIdentOfPath(modelInfo.name)%>Jacobian,public <%lastIdentOfPath(modelInfo.name)%>StateSelection
{
public:
<%lastIdentOfPath(modelInfo.name)%>Extension(IGlobalSettings* globalSettings, boost::shared_ptr<IAlgLoopSolverFactory> nonlinsolverfactory, boost::shared_ptr<ISimData> sim_data, boost::shared_ptr<ISimVars> sim_vars);
Expand Down Expand Up @@ -454,7 +454,7 @@ case SIMCODE(modelInfo=MODELINFO(vars = vars as SIMVARS(__))) then
virtual int getAMaxColors();

virtual string getModelName();
} VAR_ALIGN_POST;
};
>>
end simulationExtensionHeaderFile;

Expand Down
1 change: 0 additions & 1 deletion SimulationRuntime/cpp/CMakeLists.txt
Expand Up @@ -377,7 +377,6 @@ message(STATUS "Boost dirs '${Boost_LIBRARY_DIRS}', '${Boost_INCLUDE_DIR}'")
#build of simulation.core
include_directories ("Include")
include_directories ("Solver")
ADD_DEFINITIONS(-DWinvalid-pch)
add_subdirectory (Core/Modelica)
add_subdirectory (Core/Math)
add_subdirectory (SimCoreFactory/OMCFactory)
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/System/SimVars.cpp
Expand Up @@ -47,9 +47,9 @@ SimVars::~SimVars()
if(_real_vars)
alignedFree(_real_vars);
if(_int_vars)
alignedFree(_int_vars);
alignedFree(_int_vars);
if(_bool_vars)
alignedFree(_bool_vars);
alignedFree(_bool_vars);
}
/**
* \brief Initialize scalar real model variables in simvars memory
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Include/Core/ModelicaDefine.h
Expand Up @@ -30,7 +30,7 @@ typedef double coshRetType;
#if defined(_MSC_VER)
#define FORCE_INLINE __forceinline
#else
#define FORCE_INLINE __attribute__((always_inline))
#define FORCE_INLINE __attribute__((always_inline)) inline
#endif
#endif

Expand Down Expand Up @@ -94,4 +94,4 @@ extern template class boost::function<void (unordered_map<string,unsigned int>&
//extern template class ublas::matrix<double, adaptor_t> shared_matrix_t;
#endif
*/
*/
Expand Up @@ -104,7 +104,7 @@ class busywaiting_barrier
busywaiting_barrier(int counterValueMax) : counterValue(counterValueMax), counterValueRelease(0), ready(true), counterValueMax(counterValueMax) {}
~busywaiting_barrier() {}

FORCE_INLINE inline void wait()
FORCE_INLINE void wait()
{
//std::cerr << "entering wait function (counterValueMax: " << counterValueMax << ")" << std::endl;
while(!ready) {}
Expand Down

0 comments on commit 20a5a0c

Please sign in to comment.