Skip to content

fix(bsp): add missing #include <string.h> in esp32_p4_wifi6_touch_lcd_7b.c#156

Open
Arganox wants to merge 1 commit into
waveshareteam:masterfrom
Arganox:fix/missing-string-h-include
Open

fix(bsp): add missing #include <string.h> in esp32_p4_wifi6_touch_lcd_7b.c#156
Arganox wants to merge 1 commit into
waveshareteam:masterfrom
Arganox:fix/missing-string-h-include

Conversation

@Arganox
Copy link
Copy Markdown

@Arganox Arganox commented May 22, 2026

Problem

esp32_p4_wifi6_touch_lcd_7b.c calls memcpy() (lines 518 and 523) without including <string.h>.

On older ESP-IDF versions this compiles because string.h is transitively pulled in by other headers. On ESP-IDF v5.4.4 (and likely any version with stricter implicit-declaration warnings), the build fails:

error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration]

Fix

Add #include <string.h> alongside the existing includes.

Testing

  • Verified the project compiles cleanly with idf.py build targeting esp32p4 on ESP-IDF v5.4.4 after this change.

…_7b.c

memcpy() is used (lines 518, 523) without including <string.h>.
This compiles on older IDF versions due to transitive includes but
fails on ESP-IDF v5.4.4 with -Werror=implicit-function-declaration.
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.

1 participant