Skip to content

Commit

Permalink
Merge pull request #258 from lf-lang/silence-warnings
Browse files Browse the repository at this point in the history
Silence warnings
  • Loading branch information
erlingrj authored Aug 14, 2023
2 parents ccf230f + 34facfe commit 80a5be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/federated/federate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,11 +1672,11 @@ void handle_message(int socket, int fed_id) {
void stall_advance_level_federation(environment_t* env, size_t next_reaction_level) {
LF_PRINT_DEBUG("Trying to acquire the global mutex.");
lf_mutex_lock(&env->mutex);
LF_PRINT_DEBUG("Waiting on MLAA with next_reaction_level %d and MLAA %d.", next_reaction_level, max_level_allowed_to_advance);
LF_PRINT_DEBUG("Waiting on MLAA with next_reaction_level %zu and MLAA %d.", next_reaction_level, max_level_allowed_to_advance);
while (((int) next_reaction_level) >= max_level_allowed_to_advance) {
lf_cond_wait(&port_status_changed);
};
LF_PRINT_DEBUG("Exiting wait with MLAA %d and next_reaction_level %d.", max_level_allowed_to_advance, next_reaction_level);
LF_PRINT_DEBUG("Exiting wait with MLAA %d and next_reaction_level %zu.", max_level_allowed_to_advance, next_reaction_level);
lf_mutex_unlock(&env->mutex);
}

Expand Down
4 changes: 2 additions & 2 deletions core/threaded/scheduler_NP.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ int _lf_sched_distribute_ready_reactions(lf_scheduler_t* scheduler) {
// reactions. Therefore, the reaction vectors can be accessed without
// locking a mutex.
while (scheduler->next_reaction_level <= scheduler->max_reaction_level) {
LF_PRINT_DEBUG("Waiting with curr_reaction_level %d.", scheduler->next_reaction_level);
LF_PRINT_DEBUG("Waiting with curr_reaction_level %zu.", scheduler->next_reaction_level);
try_advance_level(scheduler->env, &scheduler->next_reaction_level);

scheduler->executing_reactions =
(void*)((reaction_t***)scheduler->triggered_reactions)[
scheduler->next_reaction_level - 1
];

LF_PRINT_DEBUG("DEBUG: start of rxn queue at %d is %lld", scheduler->next_reaction_level - 1, (long long) ((reaction_t**)scheduler->executing_reactions)[0]);
LF_PRINT_DEBUG("DEBUG: start of rxn queue at %lu is %p", scheduler->next_reaction_level - 1, ((reaction_t**)scheduler->executing_reactions)[0]);
if (((reaction_t**)scheduler->executing_reactions)[0] != NULL) {
// There is at least one reaction to execute
return 1;
Expand Down

0 comments on commit 80a5be2

Please sign in to comment.