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

bugfix: avoid warning in espcoredump when log disabled (IDFGH-10636) #11869

Merged

Conversation

cbaechler
Copy link
Contributor

@cbaechler cbaechler commented Jul 13, 2023

With commit 08be8ff an option to disable the logs in espcoredump was introduced. When using this option together with CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH, I observe the following warning:

[53/1513] Building C object esp-idf/espcoredump/CMakeFiles/__idf_espcoredump.dir/src/port/xtensa/core_dump_port.c.obj
C:/repos/v3/esp-idf/components/espcoredump/src/port/xtensa/core_dump_port.c: In function 'esp_core_dump_check_task':
C:/repos/v3/esp-idf/components/espcoredump/src/port/xtensa/core_dump_port.c:404:25: warning: unused variable 'exc_frame' [-Wunused-variable]
             XtExcFrame *exc_frame = (XtExcFrame *)task->stack_start;
                         ^~~~~~~~~

This PR adds a fix to avoid this warning.

FYI @KonssnoK

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 13, 2023
@github-actions github-actions bot changed the title bugfix: avoid warning in espcoredump when log disabled bugfix: avoid warning in espcoredump when log disabled (IDFGH-10636) Jul 13, 2023
@cbaechler cbaechler force-pushed the fix/coredump-unused-variable-warning branch from 9d7afd1 to 88aa0d6 Compare July 14, 2023 06:43
@vikramdattu
Copy link
Collaborator

sha=88aa0d61c6be93f6f268f108ae3f696f112ba0cf

@KonssnoK
Copy link
Contributor

KonssnoK commented Aug 2, 2023

please tell us when backported to v4.4

@@ -413,7 +413,7 @@ bool esp_core_dump_check_task(core_dump_task_header_t *task)
sol_frame->a1);
} else {
// to avoid warning that 'exc_frame' is unused when ESP_COREDUMP_LOG_PROCESS does nothing
#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH
#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_LOGS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vikramdattu vikramdattu added the PR-Sync-Merge Pull request sync as merge commit label Aug 2, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Aug 9, 2023
@espressif-bot espressif-bot merged commit 3befd5f into espressif:master Aug 14, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Sync-Merge Pull request sync as merge commit Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants