ZMK Firmware Fork to add Forgejo Workflow Support
Find a file
Okke Formsma 18ef73e949 fix(core): Fix memory copy bug for GATT
With newlib_libc enabled, a warning was printed for this memcpy.
uuid is a `bt_uuid_128`, while BT_UUID_GATT_CCC is only `bt_uuid_16`.

Fixes #808.

Full warning:

[53/272] Building C object CMakeFiles/app.dir/src/split/bluetooth/central.c.obj
In file included from /home/okke/.local/zephyr-sdk-0.11.2/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/string.h:180,
                 from /home/okke/dev/zmk/zephyr/include/bluetooth/bluetooth.h:21,
                 from ../../src/split/bluetooth/central.c:9:
../../src/split/bluetooth/central.c: In function 'split_central_discovery_func':
../../src/split/bluetooth/central.c:130:9: warning: '__builtin_memcpy' forming offset [5, 17] is out of the bounds [0, 4] of object '({anonymous})' with type 'struct bt_uuid_16[1]' [-Warray-bounds]
  130 |         memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid));
      |         ^~~~~~
/home/okke/dev/zmk/zephyr/include/bluetooth/uuid.h:72:45: note: '({anonymous})' declared here
   72 |  ((struct bt_uuid *) ((struct bt_uuid_16[]) {BT_UUID_INIT_16(value)}))
      |                                             ^
/home/okke/dev/zmk/zephyr/include/bluetooth/uuid.h:372:2: note: in expansion of macro 'BT_UUID_DECLARE_16'
  372 |  BT_UUID_DECLARE_16(BT_UUID_GATT_CCC_VAL)
      |  ^~~~~~~~~~~~~~~~~~
../../src/split/bluetooth/central.c:130:23: note: in expansion of macro 'BT_UUID_GATT_CCC'
  130 |         memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid));
2021-05-25 21:21:32 +02:00
.devcontainer feat(devcontainer): add volume mounts for zephyr, modules and tools 2020-12-18 09:18:08 -05:00
.github chore(deps): bump DoozyX/clang-format-lint-action from 0.11 to 0.12 2021-05-15 00:18:52 -04:00
.vscode Update NIBBLE keyboard name as per PR feedback 2020-10-27 12:44:59 -07:00
app fix(core): Fix memory copy bug for GATT 2021-05-25 21:21:32 +02:00
docs fix(docs): Add missing semicolon to examples 2021-05-19 11:10:29 -04:00
.clang-format feat(ci): Run clang-format to check files. 2020-09-14 00:08:13 -04:00
.gitattributes fix: check out Bash scripts with LF 2020-10-10 17:43:52 -05:00
.gitignore add __pycache__ to gitignore now zmk contains python files 2020-11-21 14:47:01 -05:00
.pre-commit-config.yaml fix(pre-commit): use prettier mirror and pin version 2021-02-15 07:43:43 -05:00
AUTHORS Add KemoNine to authors per PeteJohnson 2020-12-07 07:07:45 -05:00
CODE_OF_CONDUCT.md Updated email link for CoC issues. 2020-07-03 10:57:17 -04:00
CODEOWNERS chore: Initial simple CODEOWNERS. 2021-01-13 20:59:11 -05:00
CONTRIBUTING.md setup pre-commit hooks for clang-format and prettier 2021-02-04 07:42:02 -05:00
LICENSE Updated copyright line. 2020-06-22 05:47:20 -04:00
README.md update README.md with up-to-date info 2020-11-22 21:06:42 -05:00

Zephyr™ Mechanical Keyboard (ZMK) Firmware

Discord Build Contributor Covenant

ZMK Firmware is an open source (MIT) keyboard firmware built on the Zephyr™ Project Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.

Check out the website to learn more: https://zmkfirmware.dev/

You can also come join our ZMK Discord Server

To review features, check out the feature overview. ZMK is under active development, and new features are listed with the enhancement label in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.