Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello_world make all failed - Missing braces around initializer in ir_rx.c (GIT8266O-322) #761

Closed
nabeelkirmani opened this issue Nov 20, 2019 · 1 comment

Comments

@nabeelkirmani
Copy link

nabeelkirmani commented Nov 20, 2019

Environment

  • Development Kit: NodeMCU 1.0 (ESP-12E Module)
  • IDF version: 7ab9602
  • Development Env: Make (4.2.1-1.2)
  • Operating System: Debian Buster (without GUI) on Virtualbox 6.0
  • Power Supply: USB

Problem Description

While executing make all in $IDF_PATH/examples/get-started/hello_world compilation fails.

Expected Behavior

Should compile without errors.

Actual Behavior

/home/nabeel/esp/ESP8266_RTOS_SDK/components/esp8266/driver/ir_rx.c: In function 'ir_rx_intr_handler' :
/home/nabeel/esp/ESP8266_RTOS_SDK/components/esp8266/driver/ir_rx.c:59:5: error : missing braces around initializer [-Werror=missing-braces]
           static ir_rx_nec_data_t ir_data = {0};
           ^
/home/nabeel/esp/ESP8266_RTOS_SDK/components/esp8266/driver/ir_rx.c:59:5: error: (near initialization for 'ir_data.<anonymous>') [-Werror=missing-braces]
/home/nabeel/esp/ESP8266_RTOS_SDK/components/esp8266/driver/ir_rx.c: At top level"
cc1: warning " unrecognized command line option "-Wno-frame-address" [enabled by default]
cc1: some warnings are being treated as errors
make[1]: *** [/home/user/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:292: driver/ir_rx.o] Error 1
make: *** [/home/nabeel/Development/ESP8266_RTOS_SDK/make/project.mk:571: component-esp8266-build] Error 2

Capture

Steps to reproduce

Follow the step by step instructions on README.md until section Compiling the Project, execute make all

@github-actions github-actions bot changed the title hello_world make all failed - Missing braces around initializer in ir_rx.c hello_world make all failed - Missing braces around initializer in ir_rx.c (GIT8266O-322) Nov 20, 2019
@k4r4c
Copy link

k4r4c commented Dec 7, 2019

Problem seems to come from initializing the union type ir_rx_nec_data_t.
Changing the the line static ir_rx_nec_data_t ir_data = {0}; in ir_rx.c to the following solved the problem for me:

static ir_rx_nec_data_t ir_data; 
ir_data.val = 0;  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants