I've tried that as well, but then I received this error:
Compiling: keyboards/fc660c/keymaps/my660c/keymap.c
keyboards/fc660c/keymaps/my660c/keymap.c: In function 'layer_state_set_user’:
keyboards/fc660c/keymaps/my660c/keymap.c:331:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
[ERRORS]
|
|
|
tmk_core/rules.mk:377: recipe for target '.build/obj_fc660c_my660c/keyboards/fc660c/keymaps/my660c/keymap.o' failed
make[1]: *** [.build/obj_fc660c_my660c/keyboards/fc660c/keymaps/my660c/keymap.o] Error 1
Makefile:555: recipe for target 'fc660c:my660c:dfu' failed
make: *** [fc660c:my660c:dfu] Error 1
Make finished with errors
You'll need to return a value from this function even if it is just the argument to the function or a default layer\_state\_t.
layer_state_t layer_state_set_user(layer_state_t state) {
...
return state;
}
That did the trick, thank you so much /u/daniel_shields! And thank you for your help as well /u/drashna!
For anyone else reading this with the same issue, I also had to change the layer_state references, so:
if (layer_state & (1L<
That fixed the problem for me too. I had to both the return type and the argument type:
-uint32_t layer_state_set_user( uint32_t state ) {
+layer_state_t layer_state_set_user( layer_state_t state ) {
You're using `void layer_state_set_user`. Notice the void there. That's wrong. It should be `layer_state_t`, instead of the `void`
I've tried that as well, but then I received this error: Compiling: keyboards/fc660c/keymaps/my660c/keymap.c keyboards/fc660c/keymaps/my660c/keymap.c: In function 'layer_state_set_user’: keyboards/fc660c/keymaps/my660c/keymap.c:331:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: all warnings being treated as errors [ERRORS] | | | tmk_core/rules.mk:377: recipe for target '.build/obj_fc660c_my660c/keyboards/fc660c/keymaps/my660c/keymap.o' failed make[1]: *** [.build/obj_fc660c_my660c/keyboards/fc660c/keymaps/my660c/keymap.o] Error 1 Makefile:555: recipe for target 'fc660c:my660c:dfu' failed make: *** [fc660c:my660c:dfu] Error 1 Make finished with errors
You'll need to return a value from this function even if it is just the argument to the function or a default layer\_state\_t. layer_state_t layer_state_set_user(layer_state_t state) { ... return state; }
That did the trick, thank you so much /u/daniel_shields! And thank you for your help as well /u/drashna! For anyone else reading this with the same issue, I also had to change the layer_state references, so: if (layer_state & (1L<
Nice! Though for the port commands, we have generic/hardward agnostic commands that will work for that too. :)
Glad to be of help.
That fixed the problem for me too. I had to both the return type and the argument type: -uint32_t layer_state_set_user( uint32_t state ) { +layer_state_t layer_state_set_user( layer_state_t state ) {
this fixed mine!! thanks!