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-apps.git

commit de8fae7119c3e6d41f2dc79b3573c2eabcf2072b
Author: shizhenghui <[email protected]>
AuthorDate: Wed Oct 9 10:25:06 2024 +0800

    nxcodec: fix build warning
    
    nxcodec_main.c:143:37: warning: format ‘%lu’ expects argument of type ‘long 
unsigned int’, but argument 2 has type ‘uint32_t’ {aka ‘unsigned int’} 
[-Wformat=]
      143 |             printf("nxcodec size: %lux%lu\n",
          |                                   ~~^
          |                                     |
          |                                     long unsigned int
          |                                   %u
      144 |                    codec.output.format.fmt.pix.width,
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                               |
          |                                               uint32_t {aka 
unsigned int}
    nxcodec_main.c:143:41: warning: format ‘%lu’ expects argument of type ‘long 
unsigned int’, but argument 3 has type ‘uint32_t’ {aka ‘unsigned int’} 
[-Wformat=]
      143 |             printf("nxcodec size: %lux%lu\n",
          |                                       ~~^
          |                                         |
          |                                         long unsigned int
          |                                       %u
      144 |                    codec.output.format.fmt.pix.width,
      145 |                    codec.output.format.fmt.pix.height);
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                               |
          |                                               uint32_t {aka 
unsigned int}
    
    Signed-off-by: shizhenghui <[email protected]>
---
 system/nxcodec/nxcodec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/nxcodec/nxcodec_main.c b/system/nxcodec/nxcodec_main.c
index 39cc5308d..06f9f910c 100644
--- a/system/nxcodec/nxcodec_main.c
+++ b/system/nxcodec/nxcodec_main.c
@@ -140,7 +140,7 @@ int main(int argc, FAR char **argv)
                                 codec.capture.format.fmt.pix.width;
             codec.output.format.fmt.pix.height =
                                 codec.capture.format.fmt.pix.height;
-            printf("nxcodec size: %lux%lu\n",
+            printf("nxcodec size: %"PRIu32"x%"PRIu32"\n",
                    codec.output.format.fmt.pix.width,
                    codec.output.format.fmt.pix.height);
 

Reply via email to