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

[Bug] Implicit declaration of mousekey_console() after pulling master #14621

Closed
mcp292 opened this issue Sep 27, 2021 · 4 comments · Fixed by #14697
Closed

[Bug] Implicit declaration of mousekey_console() after pulling master #14621

mcp292 opened this issue Sep 27, 2021 · 4 comments · Fixed by #14697

Comments

@mcp292
Copy link

mcp292 commented Sep 27, 2021

Describe the bug

After pulling from master I get an implicit declaration of function error:

Compiling: quantum/command.c                                                                       quantum/command.c: In function 'command_console':
quantum/command.c:561:13: error: implicit declaration of function 'mousekey_console' [-Werror=implicit-function-declaration]
  561 |             mousekey_console(KC_SLASH /* ? */);
      |             ^~~~~~~~~~~~~~~~
quantum/command.c: At top level:
quantum/command.c:629:6: error: conflicting types for 'mousekey_console'; have '_Bool(uint8_t)' {aka '_Bool(unsigned char)'}
  629 | bool mousekey_console(uint8_t code) {
      |      ^~~~~~~~~~~~~~~~
quantum/command.c:561:13: note: previous implicit declaration of 'mousekey_console' with type 'int()'
  561 |             mousekey_console(KC_SLASH /* ? */);
      |             ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
 [ERRORS]
 |
 |
 |
make[1]: *** [tmk_core/rules.mk:443: .build/obj_crkbd_rev1_mcp292/quantum/command.o] Error 1
Make finished with errors
make: *** [Makefile:539: crkbd/rev1:mcp292:flash] Error 1

Git blame links it to this commit/PR, but I don't find it in my local logs nor in the github commits page for master. This makes sense because the PR was merged into develop. So I now search the master logs for "develop" to find the merge, and find nothing.

If found I would revert the commit and test to verify it is the cause of error.

System Information

  • Keyboard: crkbd
  • Operating system: Arch Linux
  • AVR GCC version: 11.2.0
  • ARM GCC version: 11.2.0
  • QMK Firmware version: 0.14.16
@mcp292
Copy link
Author

mcp292 commented Sep 27, 2021

Everything works fine when reverting to c2f227d (my last pulled commit before today).

@sigprof
Copy link
Contributor

sigprof commented Sep 27, 2021

For some reason quantum/command.c has this:

#if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
#    include "mousekey.h"
#endif

and this:

#if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
static bool mousekey_console(uint8_t code);
#endif

I guess you have MK_3_SPEED defined? Apparently the “mousekey_console() is now enabled regardless of MK_3_SPEED” part of #11842 was not 100% complete.

And the commit 383fae5 is actually in the history between c2f227d and current master, so looks like git blame pointed to it correctly.

@mcp292
Copy link
Author

mcp292 commented Sep 27, 2021

Yes I do have MK_3_SPEED defined. Oh good catch! I didn't see the #include!

@mcp292
Copy link
Author

mcp292 commented Sep 27, 2021

Odd I still don't find the commit in history even when searching by hash in my local logs.

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

Successfully merging a pull request may close this issue.

2 participants