mirror of
https://github.com/espressif/esp-rainmaker.git
synced 2026-01-20 04:28:45 +00:00
Pull Request Summary: Fix Invalid Pointer Usage in esp_rmaker_report_info
Issue
Compilation failed due to incorrect pointer usage in snprintf and json_gen_obj_set_* calls. The function incorrectly passed &key_name (a char (*)[3] type) instead of key_name (a char *), causing type mismatch errors.
Fix
Corrected snprintf usage: Passed key_name instead of &key_name.
Fixed json_gen_obj_set_* calls: Removed unnecessary address-of operator (&key_name).
Ensured correct string formatting: snprintf now correctly assigns key_name values without an explicit null termination.
Impact
Resolves compilation errors for ESP32-C3 builds.
Maintains intended functionality with proper string handling.
No functional changes, just type correctness fixes.
This fix ensures successful builds and prevents runtime issues due to incorrect pointer usage