This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit 46f9d2ecc5c5494ea735eca3a7de4776f6c15b97
Author: Szymon Janc <[email protected]>
AuthorDate: Wed May 6 15:18:57 2026 +0200

    cmd/log_mgmt: Fix compilation on linux
    
    Use types as defined in struct cbor_attr_t when passing pointers to
    addr union.
    
    Fixes following:
    Error: repos/apache-mynewt-mcumgr/cmd/log_mgmt/src/log_mgmt.c:
         In function ‘log_mgmt_show’:
    repos/apache-mynewt-mcumgr/cmd/log_mgmt/src/log_mgmt.c:373:29:
         error: initialization of ‘long long int *’ from incompatible
         pointer type ‘int64_t *’ {aka ‘long int *’}
         [-Wincompatible-pointer-types]
      373 |             .addr.integer = &timestamp,
          |                             ^
    repos/apache-mynewt-mcumgr/cmd/log_mgmt/src/log_mgmt.c:373:29:
         note: (near initialization for ‘attr[1].addr.integer’)
    repos/apache-mynewt-mcumgr/cmd/log_mgmt/src/log_mgmt.c:378:30:
         error: initialization of ‘long long unsigned int *’ from incompatible
         pointer type ‘uint64_t *’ {aka ‘long unsigned int *’}
         [-Wincompatible-pointer-types]
      378 |             .addr.uinteger = &index,
          |                              ^
    repos/apache-mynewt-mcumgr/cmd/log_mgmt/src/log_mgmt.c:378:30: note:
         (near initialization for ‘attr[2].addr.uinteger’)
---
 cmd/log_mgmt/src/log_mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/log_mgmt/src/log_mgmt.c b/cmd/log_mgmt/src/log_mgmt.c
index 9f24b72..957c2da 100644
--- a/cmd/log_mgmt/src/log_mgmt.c
+++ b/cmd/log_mgmt/src/log_mgmt.c
@@ -353,9 +353,9 @@ log_mgmt_show(struct mgmt_ctxt *ctxt)
     struct log_mgmt_log log;
     CborEncoder logs;
     CborError err;
-    uint64_t index;
+    long long unsigned int index;
     uint32_t next_idx;
-    int64_t timestamp;
+    long long int timestamp;
     int name_len;
     int log_idx;
     int rc;

Reply via email to