libsframe: bfd: use uint32_t for return type of get_num_fidx APIs

Keep the data types usage in libsframe look consistent.

bfd/
	* elf-sframe.c (_bfd_elf_merge_section_sframe): Use uint32_t
	type alias.
	* libsframe/sframe.c (sframe_decoder_get_funcdesc_at_index):
	Likewise.
	(sframe_decoder_get_num_fidx): Likewise.
	(sframe_encoder_get_num_fidx): Likewise.
include/
	* sframe-api.h (sframe_decoder_get_num_fidx): Likewise.
	(sframe_encoder_get_num_fidx): Likewise.
This commit is contained in:
Indu Bhagat 2023-06-27 11:56:26 -07:00
parent 3412dcec61
commit df6f1afb6d
3 changed files with 10 additions and 10 deletions

View File

@ -403,10 +403,10 @@ _bfd_elf_merge_section_sframe (bfd *abfd,
/* Iterate over the function descriptor entries and the FREs of the
function from the decoder context. Add each of them to the encoder
context, if suitable. */
unsigned int i = 0, j = 0, cur_fidx = 0;
uint32_t i = 0, j = 0, cur_fidx = 0;
unsigned int num_fidx = sframe_decoder_get_num_fidx (sfd_ctx);
unsigned int num_enc_fidx = sframe_encoder_get_num_fidx (sfe_ctx);
uint32_t num_fidx = sframe_decoder_get_num_fidx (sfd_ctx);
uint32_t num_enc_fidx = sframe_encoder_get_num_fidx (sfe_ctx);
for (i = 0; i < num_fidx; i++)
{

View File

@ -122,7 +122,7 @@ sframe_decoder_get_abi_arch (sframe_decoder_ctx *dctx);
/* Return the number of function descriptor entries in the SFrame decoder
DCTX. */
extern unsigned int
extern uint32_t
sframe_decoder_get_num_fidx (sframe_decoder_ctx *dctx);
/* Get the fixed FP offset from the decoder context DCTX. */
@ -219,7 +219,7 @@ sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder);
/* Return the number of function descriptor entries in the SFrame encoder
ENCODER. */
extern unsigned int
extern uint32_t
sframe_encoder_get_num_fidx (sframe_encoder_ctx *encoder);
/* Add an FRE to function at FUNC_IDX'th function descriptor index entry in

View File

@ -349,7 +349,7 @@ sframe_decoder_get_funcdesc_at_index (sframe_decoder_ctx *ctx,
uint32_t func_idx)
{
sframe_func_desc_entry *fdep;
unsigned int num_fdes;
uint32_t num_fdes;
int err;
num_fdes = sframe_decoder_get_num_fidx (ctx);
@ -1119,10 +1119,10 @@ sframe_find_fre (sframe_decoder_ctx *ctx, int32_t pc,
/* Return the number of function descriptor entries in the SFrame decoder
DCTX. */
unsigned int
uint32_t
sframe_decoder_get_num_fidx (sframe_decoder_ctx *ctx)
{
unsigned int num_fdes = 0;
uint32_t num_fdes = 0;
sframe_header *dhp = NULL;
dhp = sframe_decoder_get_header (ctx);
if (dhp)
@ -1337,10 +1337,10 @@ sframe_encoder_get_abi_arch (sframe_encoder_ctx *encoder)
/* Return the number of function descriptor entries in the SFrame encoder
ENCODER. */
unsigned int
uint32_t
sframe_encoder_get_num_fidx (sframe_encoder_ctx *encoder)
{
unsigned int num_fdes = 0;
uint32_t num_fdes = 0;
sframe_header *ehp = NULL;
ehp = sframe_encoder_get_header (encoder);
if (ehp)