-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
core: chibios: bootloader: use integer pointers as volatile #13450
Conversation
This prevents gcc from incorrectly trying to validate array bounds. ``` tmk_core/common/chibios/bootloader.c: error: '__builtin_memcpy' offset [0, 21] is out of the bounds [0, 0] [-Werror=array-bounds] 107 | __builtin_memcpy((void *) VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16 Fixes qmk#12925
Just thought you may want to check this works, as OP doesn't have a Kinetis device :) |
Ah, read up a bit on #12925. Without that context I was wildly confused... I haven't had any such issues compiling on my Debian system, though. Maybe we should ping @TheEdgeOfRage to check if it solves their issue? :) |
Whoops, didn't notice the linked issue. Sorry for the noise. |
No problem, happy to help anyway. 😛 |
I can confirm that the fix doesn't seem to introduce any issues on my Debian system at least. Compiling (still) works fine, and my |
* qmk/develop: (23 commits) Use the new ST7565 driver on Ergodox Infinity (qmk#13165) Xelus Ninjin: rename LAYOUT_all to LAYOUT_tkl_ansi_tsangan; add info.json (qmk#13477) Kopibeng XT65: Layout Macro Refactor (qmk#13476) [Keyboard] Add poker87c and poker87d (qmk#12810) [Keyboard] Add new Elise, 65% Keyboard ANSI / ISO (qmk#12782) [Keyboard] Add bm65iso (qmk#13400) [Keyboard] Add keyboard reviung5 (qmk#13375) [Keyboard] Add kabedon98e (qmk#13314) [Keyboard] Set reasonable defaults for Corne keyboard (qmk#13440) /bin/bash to /usr/bin/env bash (qmk#13422) Update `MSG_PYTHON_MISSING` (qmk#13427) core: chibios: bootloader: use integer pointers as volatile (qmk#13450) Migrate SHIFT_ESC and RGB `fn_actions` to Grave Escape and RGB keycodes (qmk#13360) `keymap_extras`: Remove deprecated defines (qmk#12949) [Keyboard] fix encoder_update_user for nullbitsco/nibble (qmk#13451) Traveller cleanup (qmk#13441) LatinPadBLE: correct info.json data (qmk#13452) Jabberwocky: adjust key positioning in Configurator (qmk#13447) Molecule: Layout Macro Refactor (qmk#13453) [Docs] added list of MIDI keycodes (qmk#13159) ...
For completeness sake, I can confirm that this fixed it for me. Thanks 👍 |
This prevents gcc from incorrectly trying to validate array bounds. ``` tmk_core/common/chibios/bootloader.c: error: '__builtin_memcpy' offset [0, 21] is out of the bounds [0, 0] [-Werror=array-bounds] 107 | __builtin_memcpy((void *) VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16 Fixes qmk#12925
This prevents gcc from incorrectly trying to validate array bounds. ``` tmk_core/common/chibios/bootloader.c: error: '__builtin_memcpy' offset [0, 21] is out of the bounds [0, 0] [-Werror=array-bounds] 107 | __builtin_memcpy((void *) VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16 Fixes qmk#12925
Description
core: chibios: bootloader: use integer pointers as volatile
This prevents gcc from incorrectly trying to validate array bounds.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Note: This is only compile tested, as I don't have such a device.