zmk/app
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
..
boards fix(boards): Proper BlueMicro840_V1 &pro_micro_a map for A10 (#733) 2021-03-24 13:21:40 -04:00
cmake build: set zmk_config.cmake cmake_minimum_required to VERSION 3.15 2020-11-20 22:24:29 -05:00
drivers fix(kscan): Proper direct wire warning message. 2021-03-15 00:39:29 -04:00
dts feature(hold-tap): Retro tapping 2021-02-24 07:24:27 -05:00
include added battery.h, last_state_of_charge to uint8_t 2021-03-10 18:07:18 -05:00
scripts chore: standardize # style headers 2021-01-06 17:00:44 -05:00
src fix(core): Fix memory copy bug for GATT 2021-05-25 21:21:32 +02:00
tests fix(behaviors): Fix sticky keys quick-release for normal keypresses 2021-05-09 07:52:41 -04:00
.gitignore Removed development files 2020-08-29 11:53:53 -07:00
CMakeLists.txt feat: Add WPM calculator and display widget 2021-01-23 18:38:31 -05:00
Kconfig fix(core): Enable sensor by default 2021-02-08 10:50:44 -05:00
prj.conf Removed development files 2020-08-29 11:53:53 -07:00
run-test.sh feat(tests): Override test parallelism w/ J=8 environment. 2021-05-05 00:56:05 -04:00
west.yml fix(west): Restore atmel west module. 2020-12-29 23:30:30 -05:00