; change MCU frequency
board_build.f_cpu = 100000000L
When compiling code with library
name=SD
version=1.3.0
I received warnings:
SdFile.cpp:1175:17: warning: taking address of packed member of 'directoryEntry' may result in an unaligned pointer value [-Waddress-of-packed-member]
1175 | dateTime_(&d->lastWriteDate, &d->lastWriteTime);
// set timestamps
if (dateTime_) {
// call user function using temporary variables for safety
uint16_t creationDate = p->creationDate;
uint16_t creationTime = p->creationTime;
dateTime_(&creationDate, &creationTime);
// After getting new values from dateTime_, you can assign them back if needed.
p->creationDate = creationDate;
p->creationTime = creationTime;
} else {
// use default date/time
p->creationDate = FAT_DEFAULT_DATE;
p->creationTime = FAT_DEFAULT_TIME;
}
p->lastAccessDate = p->creationDate;
p->lastWriteDate = p->creationDate;
p->lastWriteTime = p->creationTime;
// set modify time if user supplied a callback date/time function
if (dateTime_) {
// Create temporary variables to safely call dateTime_
uint16_t lastWriteDate = d->lastWriteDate;
uint16_t lastWriteTime = d->lastWriteTime;
// Call the function with temporary variables
dateTime_(&lastWriteDate, &lastWriteTime);
// If necessary, save updated values back to the structure
d->lastWriteDate = lastWriteDate;
d->lastWriteTime = lastWriteTime;
// Update lastAccessDate based on lastWriteDate d->lastAccessDate = d->lastWriteDate;
}
After these changes, yellow warnings during compilation disappeared.
My
platformio.ini
When compiling code with library
I received warnings:
Replaced these functions
with
and
with
After these changes, yellow warnings during compilation disappeared.