Skip to content

Commit

Permalink
Fix some clang warnings
Browse files Browse the repository at this point in the history
See #291

Co-authored-by: Alexander Pick <[email protected]>
  • Loading branch information
solardiz and alexander-pick committed Sep 19, 2024
1 parent 3cd850e commit f4ad4da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/integrity_timer/verify_kprobes/p_verify_kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ static struct kretprobe p_lkrg_dummy_kretprobe = {
.entry_handler = p_lkrg_dummy_entry,
};

#ifdef __clang__
__attribute__((optnone))
#else
__attribute__((optimize(0)))
#endif
noinline int lkrg_dummy(int arg) {

p_debug_log(P_LOG_DEBUG,
Expand Down
2 changes: 2 additions & 0 deletions src/modules/print_log/p_lkrg_print_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
p_print_ret = printk(KERN_CRIT P_LKRG_SIGNATURE "ALERT: " p_fmt "\n", ## p_args); \
else if (P_CTRL(p_log_level) >= (p_level & 7)) \
switch (p_level) { \
default: /* Pacify clang warning about no case P_LOG_ALERT, which we handle above */ \
break; \
case P_LOG_ALIVE: \
p_print_ret = printk(KERN_NOTICE P_LKRG_SIGNATURE "ALIVE: " p_fmt "\n", ## p_args); \
break; \
Expand Down

0 comments on commit f4ad4da

Please sign in to comment.