You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/18 14:03:23 UTC

[nuttx] branch master updated (0922121bc0 -> 5920a8b673)

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

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from 0922121bc0 riscv/addrenv: Do not free physical memory for SHM area
     new 6ca75deec8 drivers/can/can.c: Change size_t type printf formatter %d -> %zu
     new 5920a8b673 mm/mempool/mempool_multiple.c: Remove void * arithmetic

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/can/can.c             | 4 ++--
 mm/mempool/mempool_multiple.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


[nuttx] 01/02: drivers/can/can.c: Change size_t type printf formatter %d -> %zu

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 6ca75deec88c5af28df401c776cea18d8ea95391
Author: To Doan Ngoc Hai <to...@gmail.com>
AuthorDate: Mon Oct 31 13:36:40 2022 +0200

    drivers/can/can.c: Change size_t type printf formatter %d -> %zu
---
 drivers/can/can.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/can/can.c b/drivers/can/can.c
index 6885732fd3..7e838c168f 100644
--- a/drivers/can/can.c
+++ b/drivers/can/can.c
@@ -506,7 +506,7 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer,
   FAR struct can_dev_s     *dev = inode->i_private;
 #endif
 
-  caninfo("buflen: %d\n", buflen);
+  caninfo("buflen: %zu\n", buflen);
 
   /* The caller must provide enough memory to catch the smallest possible
    * message.  This is not a system error condition, but we won't permit
@@ -743,7 +743,7 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer,
   int                      msglen;
   int                      ret   = 0;
 
-  caninfo("buflen: %d\n", buflen);
+  caninfo("buflen: %zu\n", buflen);
 
   /* Interrupts must disabled throughout the following */
 


[nuttx] 02/02: mm/mempool/mempool_multiple.c: Remove void * arithmetic

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5920a8b673d1be77b5f9b8e3e5c971b8cdd1ab80
Author: Jukka Laitinen <ju...@ssrc.tii.ae>
AuthorDate: Wed Jan 18 14:36:48 2023 +0400

    mm/mempool/mempool_multiple.c: Remove void * arithmetic
    
    Cast substraction arguments to FAR char *, which gives the same result as the
    gcc extension on the original void * arithmetic.
    
    Signed-off-by: Jukka Laitinen <ju...@ssrc.tii.ae>
---
 mm/mempool/mempool_multiple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempool/mempool_multiple.c b/mm/mempool/mempool_multiple.c
index 0ca738be06..afa6a5e979 100644
--- a/mm/mempool/mempool_multiple.c
+++ b/mm/mempool/mempool_multiple.c
@@ -220,7 +220,7 @@ mempool_multiple_get_dict(FAR struct mempool_multiple_s *mpool,
   col = index - (row << mpool->dict_col_num_log2);
   if (mpool->dict[row] == NULL ||
       mpool->dict[row][col].addr != addr ||
-      blk - addr >= mpool->dict[row][col].size)
+      (FAR char *)blk - (FAR char *)addr >= mpool->dict[row][col].size)
     {
       return NULL;
     }