fdcavalcanti opened a new pull request, #15918:
URL: https://github.com/apache/nuttx/pull/15918

   ## Summary
   Use `PRIu32` instead of `%u` for `uint32_t` to avoid build warnings on 
different architectures.
   
   This is required as part of an effort to fix #15755.
   
   ## Impact
   
   - Impact on user: No.
   - Impact on build: Yes, removes build warnings due to wrong data type 
depending on architecture.
   - Impact on hardware: No.
   - Impact on documentation: No.
   - Impact on security: No.
   - Impact on compatibility: No.
   
   ## Testing
   
   ### Building
   
   - ./tools/configure.sh esp32s3-korvo-2:audio
   - make
   
   ### Results
   
   Before this change:
   
   ```
   In file included from audio/es8388.c:41:
   audio/es8388.c: In function 'es8388_setmclkfrequency':
   audio/es8388.c:533:15: error: format '%u' expects argument of type 'unsigned 
int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} 
[-Werror=format=]
     533 |       audinfo("MCLK Freq: %u\n", priv->mclk);
         |               ^~~~~~~~~~~~~~~~~  ~~~~~~~~~~
         |                                      |
         |                                      uint32_t {aka long unsigned int}
   audio/es8388.c:533:28: note: format string is defined here
     533 |       audinfo("MCLK Freq: %u\n", priv->mclk);
         |                           ~^
         |                            |
         |                            unsigned int
         |                           %lu
   ```
   
   Now:
   no build warnings.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to