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/05/04 19:25:54 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3657: ESP32&ESP32C3/hardware: Include files of the same level by their names only

gustavonihei commented on a change in pull request #3657:
URL: https://github.com/apache/incubator-nuttx/pull/3657#discussion_r626045590



##########
File path: arch/risc-v/src/esp32c3/hardware/esp32c3_gpio.h
##########
@@ -25,7 +25,7 @@
  * Included Files
  ****************************************************************************/
 
-#include "hardware/esp32c3_soc.h"
+#include "esp32c3_soc.h"
 

Review comment:
       I believe this case here is a bit different.
   The intention is to rely on the GCC behavior of primarily looking for the included file on the same directory of the current file, as documented here: https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
   So, as the search path will not need to be considered in this process, we might be safe.
   
   Furthermore, the header files from the `hardware` folder usually do not include files from other include paths except from the `hardware` folder itself. Although this might not be a golden rule, it also lessens the chance of occurring unpleasant surprises.




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