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

Update esp_mqtt_client_subscribe() macros #269

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Update esp_mqtt_client_subscribe() macros #269

merged 1 commit into from
Jan 26, 2024

Conversation

valesnikov
Copy link
Contributor

Change "char *" to "const char *" in esp_mqtt_client_subscribe generic macros. Without these changes, functions passing "const char *" are not compiled

/home/fl/esp/idfmaster/components/mqtt/esp-mqtt/include/mqtt_client.h:464:84: error: '_Generic' selector of type 'const char *' is not compatible with any association
  464 | #define esp_mqtt_client_subscribe(client_handle, topic_type, qos_or_size) _Generic((topic_type), \
      |                                                                                    ^

@github-actions github-actions bot changed the title Update mqtt_client.h Update mqtt_client.h (IDFGH-11944) Jan 21, 2024
@valesnikov valesnikov changed the title Update mqtt_client.h (IDFGH-11944) Update esp_mqtt_client_subscribe() macros Jan 21, 2024
@euripedesrocha
Copy link
Collaborator

euripedesrocha commented Jan 24, 2024

Hi @faceleft, thanks for the fix.
Could you modify to add an association for the const char * type and keep the char *? This way we cover both cases.

It would also be nice if you could add a more descriptive commit message title.

@valesnikov
Copy link
Contributor Author

Done

@david-cermak david-cermak merged commit 5a35782 into espressif:master Jan 26, 2024
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants