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

Remove ARM pgm_read_word workaround in rgblight #16961

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Apr 29, 2022

Description

Reproduced in deb10 + arm gcc 6.3.1. Error was

Compiling: quantum/rgblight/rgblight.c                                                             quantum/rgblight/rgblight.c: In function 'rgblight_sethsv_eeprom_helper':
quantum/rgblight/rgblight.c:563:17: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
                 uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]);
                 ^~~~~~~
cc1: all warnings being treated as errors

This was due to the wrong progmem api being used, trying to read a u8 with th u16 version.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Apr 29, 2022
@zvecr zvecr marked this pull request as ready for review April 29, 2022 00:20
@zvecr zvecr requested a review from a team April 29, 2022 00:21
@zvecr zvecr changed the title Remove ARM pgm_read_word workaround Remove ARM pgm_read_word workaround in rgblight Apr 29, 2022
@drashna drashna requested a review from a team April 29, 2022 01:32
@drashna drashna merged commit ef8db9f into qmk:develop Apr 29, 2022
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants