Browse Source

Replace sprintf with snprintf (to address g++ warnings).

adeniz_1
Alban Deniz 1 year ago
parent
commit
83ab35b32f
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      SNFMulti.cpp

+ 3
- 1
SNFMulti.cpp View File



char TimestampBfr[20]; // Timestamp buffer. char TimestampBfr[20]; // Timestamp buffer.


sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
size_t l = snprintf( // Format yyyymmddhhmmss
TimestampBfr, sizeof(TimestampBfr),
"%04d%02d%02d%02d%02d%02d",
FileNameTime.tm_year+1900, FileNameTime.tm_year+1900,
FileNameTime.tm_mon+1, FileNameTime.tm_mon+1,
FileNameTime.tm_mday, FileNameTime.tm_mday,

Loading…
Cancel
Save