From: Pekka Seppänen Date: Wed, 20 Sep 2023 18:41:01 +0000 (+0100) Subject: aarch64: Ensure const and sign correctness X-Git-Tag: basepoints/gcc-15~5956 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a59ff65df6da8267efb5c97dead8cd0dcd5b445;p=thirdparty%2Fgcc.git aarch64: Ensure const and sign correctness Be const and sign correct by using a matching CIE augmentation type. Use a builtin instead of relying 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 --- diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h index 3ad2f8239ed8..d669edd671b4 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;