mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 02:21:30 +00:00
use PRIx macros for printing u32/i32 ints (#4671)
This fix compilation issues with the latest esp-idf.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <nvs_flash.h>
|
||||
#include <cstring>
|
||||
#include <cinttypes>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@@ -101,7 +102,7 @@ class ESP32Preferences : public ESPPreferences {
|
||||
pref->nvs_handle = nvs_handle;
|
||||
|
||||
uint32_t keyval = type;
|
||||
pref->key = str_sprintf("%u", keyval);
|
||||
pref->key = str_sprintf("%" PRIu32, keyval);
|
||||
|
||||
return ESPPreferenceObject(pref);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user