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 2020/07/12 13:06:16 UTC

[GitHub] [incubator-nuttx-apps] Ouss4 commented on a change in pull request #332: examples/nrf24l01_term: Fix the nxsytyle warning

Ouss4 commented on a change in pull request #332:
URL: https://github.com/apache/incubator-nuttx-apps/pull/332#discussion_r453314294



##########
File path: examples/nrf24l01_term/nrf24l01_term.c
##########
@@ -120,8 +123,7 @@ int wireless_cfg(int fd)
   uint32_t rf = DEFAULT_RADIOFREQ;
   int32_t txpow = DEFAULT_TXPOWER;
   nrf24l01_datarate_t datarate = RATE_1Mbps;
-
-  nrf24l01_retrcfg_t retrcfg =
+  struct nrf24l01_retrcfg_t retrcfg =

Review comment:
       `nrf24l01_retrcfg_t` is a typedef (thus the _t) defined in nuttx/wireless/nrf24l01.h file, this is causing the issue.
   So `struct` should go away here, even though the coding standard specifies that structs should be typedefed, but this is out of the scope of this PR.

##########
File path: examples/nrf24l01_term/nrf24l01_term.c
##########
@@ -131,7 +133,10 @@ int wireless_cfg(int fd)
 
   uint8_t pipes_en = (1 << 0);  /* Only pipe #0 is enabled */
   nrf24l01_pipecfg_t pipe0cfg;
-  nrf24l01_pipecfg_t *pipes_cfg[NRF24L01_PIPE_COUNT] = {&pipe0cfg, 0, 0, 0, 0, 0};
+  struct nrf24l01_pipecfg_t *pipes_cfg[NRF24L01_PIPE_COUNT] =

Review comment:
       Same as above.




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