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

   ## Summary
   
   Use `PRIu32` instead of `%d`/`%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:
   ```
   CC:  i2s/i2schar.c In file included from audio/es8311.c:34:
   audio/es8311.c: In function 'es8311_getcoeff':
   audio/es8311.c:501:19: warning: format '%d' expects argument of type 'int', 
but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
     501 |           audinfo("MCLK: %d, samplerate: %d\n", priv->mclk, 
samplerate);
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~
         |                                                     |
         |                                                     uint32_t {aka 
long unsigned int}
   audio/es8311.c:501:27: note: format string is defined here
     501 |           audinfo("MCLK: %d, samplerate: %d\n", priv->mclk, 
samplerate);
         |                          ~^
         |                           |
         |                           int
         |                          %ld
   ```
   
   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