diff options
author | Pekka Seppänen <pexu@gcc.mail.kapsi.fi> | 2023-09-20 19:41:01 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-09-20 19:41:01 +0100 |
commit | 0a59ff65df6da8267efb5c97dead8cd0dcd5b445 (patch) | |
tree | ba90e8814ebb6d0713981e0cfdb368049beb8e0c /libgcc | |
parent | c08ffa04d95890f39b3f99d50d0276a61a3e66bf (diff) | |
download | gcc-0a59ff65df6da8267efb5c97dead8cd0dcd5b445.zip gcc-0a59ff65df6da8267efb5c97dead8cd0dcd5b445.tar.gz gcc-0a59ff65df6da8267efb5c97dead8cd0dcd5b445.tar.bz2 |
aarch64: Ensure const and sign correctness
Be const and sign correct by using a matching CIE augmentation type.
Use a builtin instead of relying <string.h> being included.
libgcc/ChangeLog:
* config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key):
Use const unsigned type and a builtin.
Signed-off-by: Pekka Seppänen <pexu@gcc.mail.kapsi.fi>
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config/aarch64/aarch64-unwind.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h index 3ad2f82..d669edd 100644 --- a/libgcc/config/aarch64/aarch64-unwind.h +++ b/libgcc/config/aarch64/aarch64-unwind.h @@ -40,8 +40,9 @@ aarch64_cie_signed_with_b_key (struct _Unwind_Context *context) const struct dwarf_cie *cie = get_cie (fde); if (cie != NULL) { - char *aug_str = cie->augmentation; - return strchr (aug_str, 'B') == NULL ? 0 : 1; + const unsigned char *aug_str = cie->augmentation; + return __builtin_strchr ((const char *) aug_str, + 'B') == NULL ? 0 : 1; } } return 0; |