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 2022/11/13 14:35:29 UTC

[incubator-nuttx] 05/18: Fix Error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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/incubator-nuttx.git

commit ba286e38245291cf5170965bb596dec9d3ae22e2
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:50:54 2022 +0800

    Fix Error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/rp2040/rp2040_ws2812.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/rp2040/rp2040_ws2812.c b/arch/arm/src/rp2040/rp2040_ws2812.c
index f6aeb25093..a0f5622e2f 100644
--- a/arch/arm/src/rp2040/rp2040_ws2812.c
+++ b/arch/arm/src/rp2040/rp2040_ws2812.c
@@ -180,13 +180,13 @@ static int my_open(struct file *filep)
     {
       /* We've already been initialized.  Keep on truckin' */
 
-      ledinfo("rp2040_ws2812 re-open dev: 0x%08lX\n", (uint32_t) dev_data);
+      ledinfo("rp2040_ws2812 re-open dev: 0x%p\n", dev_data);
 
       ret = OK;
       goto post_and_return;
     }
 
-  ledinfo("rp2040_ws2812 open dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 open dev: 0x%p\n", dev_data);
 
   /* Allocate the pixel buffer */
 
@@ -344,7 +344,7 @@ static int my_close(struct file *filep)
 
   nxmutex_lock(&dev_data->lock);
 
-  ledinfo("rp2040_ws2812 close dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 close dev: 0x%p\n", dev_data);
 
   priv->open_count -= 1;
 
@@ -390,7 +390,7 @@ static ssize_t my_write(struct file *filep,
 
   nxmutex_lock(&dev_data->lock);
 
-  ledinfo("rp2040_ws2812 write dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 write dev: 0x%p\n", dev_data);
 
   if (len > 0)
     {
@@ -577,7 +577,7 @@ void * rp2040_ws2812_setup(const char *path,
 
   priv->power_pin     = power_pin;
 
-  ledinfo("register dev_data: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("register dev_data: 0x%p\n", dev_data);
 
   err = ws2812_register(path, dev_data);