Skip to content

Commit

Permalink
Use macro for no-sanitize overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
cgzones committed Jan 8, 2024
1 parent 95fac8f commit 1e7fe2d
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,7 @@ int is_role_if(const char *if_name)
}
}

#if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#if (__clang_major__ >= 12)
__attribute__((no_sanitize("unsigned-shift-base")))
#endif
#endif
no_sanitize_unsigned_integer_
void mark_used_if(const char *if_name)
{
struct if_hash_elem *used_if;
Expand All @@ -443,12 +438,7 @@ void mark_used_if(const char *if_name)
}
}

#if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#if (__clang_major__ >= 12)
__attribute__((no_sanitize("unsigned-shift-base")))
#endif
#endif
no_sanitize_unsigned_integer_
int is_used_if(const char *if_name)
{
struct if_hash_elem *used_if;
Expand Down

0 comments on commit 1e7fe2d

Please sign in to comment.