public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] libsframe: bfd: use uint32_t for return type of get_num_fidx APIs
@ 2023-06-27 19:42 Indu Bhagat
  0 siblings, 0 replies; only message in thread
From: Indu Bhagat @ 2023-06-27 19:42 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=df6f1afb6d369a83ba34e1cb2122a061234e50ca

commit df6f1afb6d369a83ba34e1cb2122a061234e50ca
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Tue Jun 27 11:56:26 2023 -0700

    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.

Diff:
---
 bfd/elf-sframe.c     |  6 +++---
 include/sframe-api.h |  4 ++--
 libsframe/sframe.c   | 10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c
index 069f7564fb4..013a892e08a 100644
--- a/bfd/elf-sframe.c
+++ b/bfd/elf-sframe.c
@@ -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++)
     {
diff --git a/include/sframe-api.h b/include/sframe-api.h
index 9cb2db0edb9..7594011a48f 100644
--- a/include/sframe-api.h
+++ b/include/sframe-api.h
@@ -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
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 40927f06933..29142436b84 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-27 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 19:42 [binutils-gdb] libsframe: bfd: use uint32_t for return type of get_num_fidx APIs Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).