poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU poke 2.0.91 pre-released in alpha.gnu.org


From: Jose E. Marchesi
Subject: Re: GNU poke 2.0.91 pre-released in alpha.gnu.org
Date: Sat, 05 Feb 2022 03:01:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> On macOS 12.2/arm64:
> Builds fine, with many warnings, mostly from jitter. Log attached.

The rest of the warnings on the poke side are addressed in the patch
below I just committed.

Thanks for the report.

commit f970ef91641e5f0d16a900b10524e5f4c395e14f
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Sat Feb 5 03:00:54 2022 +0100

    poke: avoid using uninitialized value and use PRIx64
    
    2022-02-05  Jose E. Marchesi  <jemarch@gnu.org>
    
            * poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Avoid using `regexp'
            uninitialized.
            * poke/pk-cmd-ios.c (pk_cmd_sub): Use PRIx64 instead of %lx.
            (print_info_ios): Likewise.
            (print_info_ios): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 61dd5504..1d8f77a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2022-02-05  Jose E. Marchesi  <jemarch@gnu.org>
 
+       * poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Avoid using `regexp'
+       uninitialized.
+       * poke/pk-cmd-ios.c (pk_cmd_sub): Use PRIx64 instead of %lx.
+       (print_info_ios): Likewise.
+       (print_info_ios): Likewise.
+
+2022-02-05  Jose E. Marchesi  <jemarch@gnu.org>
+
        * bootstrap.conf (gnulib_modules): Add the `getsockname' gnulib
        module.
        * poke/pk-hserver.c (pk_hserver_start): Cast the pointer to
diff --git a/poke/pk-cmd-def.c b/poke/pk-cmd-def.c
index 76c7c828..ed236a4e 100644
--- a/poke/pk-cmd-def.c
+++ b/poke/pk-cmd-def.c
@@ -168,10 +168,10 @@ print_type_decl (int kind,
               return 0;                                                 \
             }                                                           \
           payload.regexp_p = 1;                                         \
+          payload.regexp = regexp;                                      \
         }                                                               \
       else                                                              \
         payload.regexp_p = 0;                                           \
-      payload.regexp = regexp;                                          \
     }                                                                   \
   while (0)
 
diff --git a/poke/pk-cmd-ios.c b/poke/pk-cmd-ios.c
index dd0b1720..6dcf4335 100644
--- a/poke/pk-cmd-ios.c
+++ b/poke/pk-cmd-ios.c
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <readline.h>
 #include "xalloc.h"
 
@@ -87,7 +88,7 @@ pk_cmd_sub (int argc, struct pk_cmd_arg argv[], uint64_t 
uflags)
   name = PK_CMD_ARG_STR (argv[4]);
 
   /* Build the handler.  */
-  if (asprintf (&handler, "sub://%d/0x%lx/0x%lx/%s",
+  if (asprintf (&handler, "sub://%d/0x%" PRIx64 "/0x%lx/%s",
                 ios, base, size, name) == -1)
     return 0;
 
@@ -286,9 +287,9 @@ print_info_ios (pk_ios io, void *data)
     char *string;
     uint64_t bias = pk_ios_get_bias (io);
     if (bias % 8 == 0)
-      asprintf (&string, "0x%08jx#B", bias / 8);
+      asprintf (&string, "0x%08" PRIx64 "#B", bias / 8);
     else
-      asprintf (&string, "0x%08jx#b", bias);
+      asprintf (&string, "0x%08" PRIx64 "#b", bias);
     pk_table_column_cl (table, string, "offset");
     free (string);
   }
@@ -296,7 +297,7 @@ print_info_ios (pk_ios io, void *data)
   /* Size.  */
   {
     char *size;
-    asprintf (&size, "0x%08jx#B", pk_ios_size (io));
+    asprintf (&size, "0x%08" PRIx64 "#B", pk_ios_size (io));
     pk_table_column_cl (table, size, "offset");
     free (size);
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]