From bbb1e96f2c17bd7c84e9427bc2f26fc6fd2fb923 Mon Sep 17 00:00:00 2001 From: "Rule Timothy (CC/EMT2)" Date: Fri, 1 Dec 2023 13:15:42 +0100 Subject: [PATCH] Fix build error. Signed-off-by: Rule Timothy (CC/EMT2) --- dse/clib/fmi/fmu.h | 4 ++-- dse/clib/fmi/importer.c | 4 ++++ dse/clib/fmi/strategy.c | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dse/clib/fmi/fmu.h b/dse/clib/fmi/fmu.h index e6e5dd0..de23679 100644 --- a/dse/clib/fmi/fmu.h +++ b/dse/clib/fmi/fmu.h @@ -125,7 +125,7 @@ typedef struct storage_bucket { /* fmu.c */ -DLL_PRIVATE void* model_create( +DLL_PRIVATE FmuModelDesc* model_create( void* fmu_inst, FmuMemAllocFunc mem_alloc, FmuMemFreeFunc mem_free); DLL_PRIVATE void model_finalize(FmuModelDesc* model_desc); /* Model API (implemented by the Model). */ @@ -138,7 +138,7 @@ DLL_PRIVATE void model_destroy(FmuModelDesc* model_desc); /* storage.c */ DLL_PRIVATE int storage_init(FmuModelDesc* model_desc); -DLL_PRIVATE void* storage_get_bucket( +DLL_PRIVATE storage_bucket* storage_get_bucket( FmuModelDesc* model_desc, storage_type type); DLL_PRIVATE void* storage_ref( FmuModelDesc* model_desc, unsigned int vr, storage_type type); diff --git a/dse/clib/fmi/importer.c b/dse/clib/fmi/importer.c index 5b9d0cf..fa5d5f7 100644 --- a/dse/clib/fmi/importer.c +++ b/dse/clib/fmi/importer.c @@ -43,6 +43,8 @@ int fmu_step(FmuInstDesc* inst, double* model_time, double stop_time) assert(inst); assert(inst->strategy); assert(inst->strategy->exec_func); + UNUSED(model_time); + UNUSED(stop_time); // TODO set model time, stop time. @@ -87,6 +89,8 @@ void fmu_map_variables(FmuInstDesc* inst, FmiValueType value_type, char** names, void** values, size_t count) { assert(inst); + UNUSED(value_type); + if (count == 0) return; if (inst->inst_data == NULL) { inst->inst_data = calloc(1, sizeof(SignalMap)); diff --git a/dse/clib/fmi/strategy.c b/dse/clib/fmi/strategy.c index a4e98a8..4d531ca 100644 --- a/dse/clib/fmi/strategy.c +++ b/dse/clib/fmi/strategy.c @@ -36,8 +36,6 @@ Returns */ int fmi2_cosim_execute(FmuInstDesc* inst, FmuStrategyAction action) { - int models_active; - switch (action) { case FMU_STRATEGY_ACTION_LOAD: /* Call the FMU Adapter Load method. */