Jeff Epler
9632360caa
Use a macro to compute the size of arrays at compile time ( #18044 )
...
* Add ARRAY_SIZE and CEILING utility macros
* Apply a coccinelle patch to use ARRAY_SIZE
* fix up some straggling items
* Fix 'make test:secure'
* Enhance ARRAY_SIZE macro to reject acting on pointers
The previous definition would not produce a diagnostic for
```
int *p;
size_t num_elem = ARRAY_SIZE(p)
```
but the new one will.
* explicitly get definition of ARRAY_SIZE
* Convert to ARRAY_SIZE when const is involved
The following spatch finds additional instances where the array is
const and the division is by the size of the type, not the size of
the first element:
```
@ rule5a using "empty.iso" @
type T;
const T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
@ rule6a using "empty.iso" @
type T;
const T[] E;
@@
- sizeof(E)/sizeof(T)
+ ARRAY_SIZE(E)
```
* New instances of ARRAY_SIZE added since initial spatch run
* Use `ARRAY_SIZE` in docs (found by grep)
* Manually use ARRAY_SIZE
hs_set is expected to be the same size as uint16_t, though it's made
of two 8-bit integers
* Just like char, sizeof(uint8_t) is guaranteed to be 1
This is at least true on any plausible system where qmk is actually used.
Per my understanding it's universally true, assuming that uint8_t exists:
https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1
* Run qmk-format on core C files touched in this branch
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-08-30 10:20:04 +02:00
..
2x5keypad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
3dfoxc
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
3dortho14u
RESET -> QK_BOOT keyboard readme ( #18110 )
2022-08-20 11:34:17 +01:00
3dp660
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
6key
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
6macro
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
10k
RESET -> QK_BOOT keyboard readme ( #18110 )
2022-08-20 11:34:17 +01:00
42
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
108key_trackpoint
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
412_64
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
aball
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
aek64
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
aim65
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
amigopunk
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
angel
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
aplx2
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
aranck
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
arrow_pad
Switch over MANUFACTURER and PRODUCT to string literals ( #18183 )
2022-08-28 09:59:40 -07:00
atreus50
Clean-up of #define _ADJUST 16 instances ( #18182 )
2022-08-27 23:13:44 -07:00
axon
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
baredev /rev1
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
battleship_gamepad
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
bdn9_ble
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
bento
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
bigmac
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
bolek
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
boss566y /redragon_vara
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
brain
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
bstk100
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
cans12er
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
carpolly
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
chiron
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
ck4x4
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
cmd60
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
co60
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
colorlice
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
concertina
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
consolekeyboard
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
croxsplit44
RESET -> QK_BOOT keyboard readme ( #18110 )
2022-08-20 11:34:17 +01:00
curiosity
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
cyberstar
Cyberstar Custom ( #18076 )
2022-08-19 20:47:45 +01:00
d48
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
dactyl
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
dactyl_left
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
dactyl_manuform
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
dactyl_promicro
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
dactyl_rah
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
daishi
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
datahand
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
dc/mc /001
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
ddg_56
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
dqz11n1g
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
dygma /raise
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
eagleii
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
elrgo_s
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
ergocheap
Merge remote-tracking branch 'origin/master' into develop
2022-07-30 07:32:18 +00:00
evk
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
fc200rt_qmk
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
fivethirteen
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
floorboard
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
frankie_macropad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
frenchdev
Merge remote-tracking branch 'origin/master' into develop
2022-07-30 07:32:18 +00:00
freoduo
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
fruity60
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
gamenum
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
hacked_motospeed
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
heisenberg
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
hexon38
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
hillside
[Keymap] Add Miryoku keymap for Hillside 48 ( #18191 )
2022-08-28 13:20:30 -07:00
hnah40
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
hnah40rgb
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
hnah108
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
ibm122m
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
ibm_wheelwriter
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
jn68m
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
jopr
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
jot50
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
jotanck
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
jotpad16
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
jtallbean
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
juliet
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
k8split
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
k_numpad17
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
kbod
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
ks63
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
lagrange
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
leftynumpad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
lemonpad
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
lovelive9
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
m40 /5x5_macropad
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
macroboard
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
magicforce61
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
magicforce68
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
marauder
[Core] Process all changed keys in one scan loop, deprecate QMK_KEYS_PER_SCAN ( #15292 )
2022-08-06 20:51:13 +10:00
mechboards_micropad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
meck_tkl
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
minorca
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
misterdeck
Joystick feature updates ( #16732 )
2022-03-26 18:38:09 +00:00
ms_sculpt_mobile
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
mutepad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
myskeeb
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
nicekey
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
not_so_minidox
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
novem
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
nozbe_macro
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
numpad20
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
obuwunkunubi /spaget
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
oem_ansi_fullsize
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
oem_iso_fullsize
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
onekey
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
ortho5x13
Clean-up of #define _ADJUST 16 instances ( #18182 )
2022-08-27 23:13:44 -07:00
ortho5x14
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
ortho_brass
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
owlet60
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
p65rgb
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
pilcrow
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
pill60
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
postageboard
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 00:32:18 +00:00
prime_exl
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
prime_exl_plus
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
prkl30
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
promethium
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
pterodactyl
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
pteron
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
pteron38
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
pteron44
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
pytest
device_ver -> device_version for some more boards (#16685 )
2022-03-19 11:52:40 +00:00
qc60
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
reclined
RESET -> QK_BOOT default keymaps ( #17037 )
2022-05-15 20:26:27 +01:00
retro_refit
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
riblee_f401
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
riblee_f411
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
rs60
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
selene
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
sick68
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
sick_pad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
skakunm_dactyl
[Keyboard] Added different wiring of dactyl ( #17997 )
2022-08-13 17:46:35 -07:00
slash
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
snatchpad
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 10:22:48 -07:00
sono1
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
space_oddity
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
split65
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
split89
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
splittest
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
steamvan
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
stef9998 /split_5x7
[Keyboard] Add handwired Split 5x7 ( #18128 )
2022-08-28 21:49:17 -07:00
sticc14
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
stream_cheap
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
swiftrax
[Keyboard] add rgb animation handwired/swiftrax/glacier ( #18121 )
2022-08-22 19:12:33 -07:00
symmetric70_proto
Use a macro to compute the size of arrays at compile time ( #18044 )
2022-08-30 10:20:04 +02:00
symmetry60
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
t111
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
tennie
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
terminus_mini
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
trackpoint
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
tractyl_manuform
[Keymap] Drashna keymap updates for 0.18.0 ( #18184 )
2022-08-28 12:55:19 -07:00
traveller
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
tritium_numpad
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
twadlee /tp69
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
unicomp_mini_m
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
unk
Move keyboard USB IDs and strings to data driven, pass 2: handwired ( #18079 )
2022-08-20 10:31:48 +10:00
uthol
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
videowriter
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
wabi
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
wakizashi40
RESET -> QK_BOOT keyboard readme ( #18110 )
2022-08-20 11:34:17 +01:00
woodpad
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
wulkan
Move keyboard USB IDs and strings to data driven: handwired ( #17822 )
2022-07-30 17:31:44 +10:00
xealous
Merge remote-tracking branch 'origin/master' into develop
2022-08-20 00:32:18 +00:00
xealousbrown
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00
z150
RESET -> QK_BOOT user keymaps ( #17940 )
2022-08-21 23:55:30 +01:00
zergo
Remove UNUSED_PINS ( #17931 )
2022-08-06 23:23:35 +10:00