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 2022/10/23 11:49:45 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

xiaoxiang781216 opened a new pull request, #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398

   ## Summary
   since new version gcc toolchain make more check.
   
   ## Impact
   Minor
   
   ## Testing
   Pass CI
   


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#discussion_r1002708020


##########
drivers/mmcsd/mmcsd_sdio.c:
##########
@@ -2659,6 +2659,8 @@ static int mmcsd_read_csd(FAR struct mmcsd_state_s *priv)
       return -EPERM;
     }
 
+  memset(buffer, sizeof(buffer));

Review Comment:
   ```suggestion
     memset(buffer, 0, sizeof(buffer));
   ```
   



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288146490

   It's hard to compile all config in the local machine


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288197425

   @xiaoxiang781216 seems like the new toolchain has an issue with `gcov`:
   ```
   rm-none-eabi-ld: /github/workspace/sources/nuttx/staging/libarch.a(rp2040_start.o): in function `__start':
   /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_start.c:83: undefined reference to `__gcov_indirect_call_profiler_v4'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_start.c:139: undefined reference to `__gcov_indirect_call'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_start.c:139: undefined reference to `__gcov_time_profiler_counter'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/staging/libarch.a(rp2040_clock.o): in function `rp2040_clock_configure':
   /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_clock.c:87: undefined reference to `__gcov_indirect_call_profiler_v4'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_clock.c:101: undefined reference to `__gcov_topn_values_profiler'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_clock.c:144: undefined reference to `__gcov_topn_values_profiler'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_clock.c:147: undefined reference to `__gcov_indirect_call'
   arm-none-eabi-ld: /github/workspace/sources/nuttx/arch/arm/src/chip/rp2040_clock.c:147: undefined reference to `__gcov_time_profiler_counter'
   ...
   ```
   Please investigate. Most probably `EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))` is not evaluated properly.
   
   Anyway I'm merging this RP because `gcov` issue seems to be the last step to restore CI on mainline


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288138643

   > Still some other errors remain
   
   Fix here: https://github.com/apache/incubator-nuttx/pull/7398/commits/8b78bcc9649d26b27a82394e7f6a19c68a386553
   The new gcc version do the great job to catch so many error in compile time.


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288141729

   > > Still some other errors remain
   > 
   > Fix here: https://github.com/apache/incubator-nuttx/pull/7398/commits/8b78bcc9649d26b27a82394e7f6a19c68a386553
   > The new gcc version do a great job to catch so many error in compile time.
   
   Yes. But I was expecting builds to be run locally and those fixes to be merged prior to toolchain upgrade :)


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#discussion_r1002749169


##########
arch/arm/src/sam34/sam4s_nand.c:
##########
@@ -149,7 +149,11 @@ static int nand_wait_ready(struct sam_nandcs_s *priv)
 
   /* The ready/busy (R/nB) signal of the NAND Flash  */
 
-  while (!sam_gpioread(priv->rb));
+  while (!sam_gpioread(priv->rb))
+    {
+      ;

Review Comment:
   ```suggestion
   ```
   



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#discussion_r1002751126


##########
arch/arm/src/sam34/sam4s_nand.c:
##########
@@ -149,7 +149,11 @@ static int nand_wait_ready(struct sam_nandcs_s *priv)
 
   /* The ready/busy (R/nB) signal of the NAND Flash  */
 
-  while (!sam_gpioread(priv->rb));
+  while (!sam_gpioread(priv->rb))
+    {
+      ;

Review Comment:
   Done.



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] btashton commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
btashton commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288148091

   > It's hard to compile all config in the local machine. It's more simple that ci use the new docker image(instead the old) run all config if the patch change Dockerfile. @btashton is it possible?
   
   Unfortunately you cannot push from a PR to the container registry (which makes sense for security), but what you can do it push to a registry including one off your GitHub fork, and then reference that in the PR until things are working. I have done that a few times. 
   
   I can also put some more thought into other workflow setups but this is probably the easiest path for now. 


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#discussion_r1002710219


##########
drivers/mmcsd/mmcsd_sdio.c:
##########
@@ -2659,6 +2659,8 @@ static int mmcsd_read_csd(FAR struct mmcsd_state_s *priv)
       return -EPERM;
     }
 
+  memset(buffer, sizeof(buffer));

Review Comment:
   Done.



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288130247

   Still some other errors remain


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7398: Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7398:
URL: https://github.com/apache/incubator-nuttx/pull/7398#issuecomment-1288380466

   @anchao is looking this problem, look like the toolchain compile libgcov with the wrong config. Anyway, if we can't fix the problem soon, we can temp disable gcov option from defconfig.


-- 
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-unsubscribe@nuttx.apache.org

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