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

remove undeclared struct warning #4

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Conversation

laserscout
Copy link

Hello,

Wouldn't it be best practice to declare the structs used in a header? That would remove the compile warnings:

[48/344] Building C object CMakeFiles/app.dir/src/keymap.c.obj
In file included from /app/zmk/app/src/keymap.c:20:
/app/zmk/app/include/zmk/split/bluetooth/central.h:10:36: warning: 'struct zmk_periph_led' declared inside parameter list will not be visible outside of this definition or declaration
   10 | int zmk_split_bt_update_led(struct zmk_periph_led *periph);
      |                                    ^~~~~~~~~~~~~~
/app/zmk/app/include/zmk/split/bluetooth/central.h:11:35: warning: 'struct backlight_state' declared inside parameter list will not be visible outside of this definition or declaration
   11 | int zmk_split_bt_update_bl(struct backlight_state *periph);
      |                                   ^~~~~~~~~~~~~~~
[62/344] Building C object CMakeFiles/app.dir/src/backlight.c.obj
In file included from /app/zmk/app/src/backlight.c:26:
/app/zmk/app/include/zmk/split/bluetooth/central.h:10:36: warning: 'struct zmk_periph_led' declared inside parameter list will not be visible outside of this definition or declaration
   10 | int zmk_split_bt_update_led(struct zmk_periph_led *periph);
      |                                    ^~~~~~~~~~~~~~
[67/344] Building C object CMakeFiles/app.dir/src/rgb_underglow.c.obj
In file included from /app/zmk/app/src/rgb_underglow.c:35:
/app/zmk/app/include/zmk/split/bluetooth/central.h:11:35: warning: 'struct backlight_state' declared inside parameter list will not be visible outside of this definition or declaration
   11 | int zmk_split_bt_update_bl(struct backlight_state *periph);
      |                                   ^~~~~~~~~~~~~~~

@ReFil
Copy link
Owner

ReFil commented Jan 12, 2023

Hi, sorry this got missed, you're right. Thank you very much. Merged :)

@ReFil ReFil merged commit 479a6d5 into ReFil:adv360-z3 Jan 12, 2023
ReFil pushed a commit that referenced this pull request Sep 12, 2023
ReFil pushed a commit that referenced this pull request Oct 18, 2023
ReFil pushed a commit that referenced this pull request Dec 17, 2023
ReFil pushed a commit that referenced this pull request Mar 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants