OK, this is purely to get rid of a compiler error "warning C4700: uninitialized local variable 'timeinfo' used".
It's a trivial warning because timeinfo is used to store a value passed to it by localtime_s so its uninitialized state is irrelevant. However I'd like to get rid of it, and I think I'm just missing something very obvious indeed.
How do I pass an arbitrary value to timeinfo to shut the compiler up?
struct tm * timeinfo;
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
timeinfo = localtime(death_time);
strftime(entry->day, sizeof(entry->day), "@%Y%m%d", timeinfo);
my_strcpy(entry->day, "TODAY", sizeof(entry->day));
Obviously if there are other problems with my code I'd like to know. ;-).