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

change assignment of sdcard members to appease GCC 8.4.0 #785

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

llange
Copy link
Contributor

@llange llange commented Nov 28, 2022

GCC 8.4.0 does not accept an assignment with the macros SDMMC_HOST_DEFAULT() and SDMMC_SLOT_CONFIG_DEFAULT(), because the macros are defined as a curly braces list ; it fails with error: no match for 'operator=' (operand types are 'sdmmc_host_t' and '<brace-enclosed initializer list>')

This patch fixes the syntax so that it works with GCC 8.4.0, by prepending the type before the list. GCC 5.2.0 is OK with the fix.

See #360

Signed-off-by: Ludovic LANGE [email protected]

GCC 8.4.0 does not accept an assignment with the macros
[`SDMMC_HOST_DEFAULT()`](https://github.com/espressif/esp-idf/blob/8153bfe4125e6a608abccf1561fd10285016c90a/components/driver/include/driver/sdmmc_host.h#L30)
and [`SDMMC_SLOT_CONFIG_DEFAULT()`](https://github.com/espressif/esp-idf/blob/8153bfe4125e6a608abccf1561fd10285016c90a/components/driver/include/driver/sdmmc_host.h#L92),
because the macros are defined as a curly braces list ; it fails with
`error: no match for 'operator=' (operand types are 'sdmmc_host_t' and '<brace-enclosed initializer list>')`

This patch fixes the syntax so that it works with GCC 8.4.0, by prepending the type before the list.
GCC 5.2.0 is OK with the fix.

See openvehicles#360

Signed-off-by: Ludovic LANGE <[email protected]>
@dexterbg dexterbg merged commit 4e85273 into openvehicles:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants