Skip to content

Commit

Permalink
aarch64: Fix warnings during libgcc build
Browse files Browse the repository at this point in the history
libgcc/

	* config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key):
	Add missing const qualifier.  Cast from const unsigned char *
	to const char *.  Use __builtin_strchr to avoid an implicit
	function declaration.
	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state):
	Add missing cast.
  • Loading branch information
fweimer-rh authored and ouuleilei-bot committed Jul 11, 2023
1 parent c2d62cd commit 503b696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libgcc/config/aarch64/aarch64-unwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ 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 char *aug_str = (const char *) cie->augmentation;
return __builtin_strchr (aug_str, 'B') == NULL ? 0 : 1;
}
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion libgcc/config/aarch64/linux-unwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
}

rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
sc = (struct sigcontext *) &rt_->uc.uc_mcontext;

/* This define duplicates the definition in aarch64.md */
#define SP_REGNUM 31
Expand Down

0 comments on commit 503b696

Please sign in to comment.