You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/03/19 20:11:09 UTC

[GitHub] [incubator-nuttx-apps] hartmannathan opened a new pull request #625: examples/qencoder: Fix printf() warning

hartmannathan opened a new pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625


   ## Summary
   
   - Fix printf() had "%d" but argument was int32_t by changing format string to "%ld" and casting the int32_t to long int for purposes of printing, to ensure portability.
   - Fix nxstyle errors.
   
   ## Impact
   
   Removes compiler warnings and nxstyle errors.
   
   ## Testing
   
   - build testing
   - nxstyle


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

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625#issuecomment-803104482


   > I don't understand this error:
   > 
   > "Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/qencoder/qe_main.c:2:1: error: Path relative to repository other than "nuttx" must begin with the root directory"
   > 
   > How is the path on line 2 supposed to be written?
   
   add apps/ before examples/


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

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



[GitHub] [incubator-nuttx-apps] patacongo commented on pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625#issuecomment-803160482


   >     * Fix printf() had "%d" but argument was int32_t by changing format string to "%ld" and casting the int32_t to long int for purposes of printing, to ensure portability.
   
   The "canonically correct" way to resolve printing of fixed length integers is to include inttypes.h and replace "%d" with "%" PRIi32
   
   Casting to long works too but long may have different lengths on different machines.


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

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



[GitHub] [incubator-nuttx-apps] hartmannathan commented on pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625#issuecomment-803101550


   I don't understand this error:
   
   "Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/examples/qencoder/qe_main.c:2:1: error: Path relative to repository other than "nuttx" must begin with the root directory"
   
   How is the path on line 2 supposed to be written?


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

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



[GitHub] [incubator-nuttx-apps] hartmannathan commented on pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625#issuecomment-803129674


   > add apps/ before examples/
   
   Thanks... let's see if this solves it.


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

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



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625


   


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

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



[GitHub] [incubator-nuttx-apps] hartmannathan commented on pull request #625: examples/qencoder: Fix printf() warning

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #625:
URL: https://github.com/apache/incubator-nuttx-apps/pull/625#issuecomment-803174360


   > > ```
   > > * Fix printf() had "%d" but argument was int32_t by changing format string to "%ld" and casting the int32_t to long int for purposes of printing, to ensure portability.
   > > ```
   > 
   > 
   > The "canonically correct" way to resolve printing of fixed length integers is to include inttypes.h and replace "%d" with "%" PRIi32
   > 
   > 
   > Casting to long works too but long may have different lengths on different machines.
   
   Ok, I will change it...


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

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