Skip to content

Commit

Permalink
kernel: coding guidelines: add explicit cast to void
Browse files Browse the repository at this point in the history
- added explicit cast to void when returned value is expectedly ignored

Signed-off-by: frei tycho <tfrei@baumer.com>
  • Loading branch information
tychofrei02 committed Apr 30, 2024
1 parent 69fa7dc commit bdc0adb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void z_smp_global_unlock(unsigned int key)
_current->base.global_lock_count--;

if (!_current->base.global_lock_count) {
atomic_clear(&global_lock);
(void)atomic_clear(&global_lock);
}
}

Expand All @@ -85,7 +85,7 @@ void z_smp_global_unlock(unsigned int key)
void z_smp_release_global_lock(struct k_thread *thread)
{
if (!thread->base.global_lock_count) {
atomic_clear(&global_lock);
(void)atomic_clear(&global_lock);
}
}

Expand Down

0 comments on commit bdc0adb

Please sign in to comment.