File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15176,19 +15176,21 @@ tng_function_status DECLSPECDLLEXPORT tng_time_get_str
15176
15176
{
15177
15177
struct tm *time_data;
15178
15178
time_t secs;
15179
+ int retval;
15179
15180
15180
15181
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
15181
15182
TNG_ASSERT(time, "TNG library: time must not be a NULL pointer");
15182
15183
15183
15184
secs = tng_data->time;
15184
15185
15185
15186
time_data = localtime(&secs); /* Returns a statically allocated variable. */
15186
- TNG_SNPRINTF(time, TNG_MAX_DATE_STR_LEN,
15187
+ retval = TNG_SNPRINTF(time, TNG_MAX_DATE_STR_LEN,
15187
15188
"%4d-%02d-%02d %02d:%02d:%02d",
15188
15189
time_data->tm_year+1900, time_data->tm_mon+1, time_data->tm_mday,
15189
15190
time_data->tm_hour, time_data->tm_min, time_data->tm_sec);
15190
15191
15191
- return(TNG_SUCCESS);
15192
+ /* handle return value (also) to quiet a -Wformat-truncation warning */
15193
+ return( (retval < 0) ? TNG_SUCCESS : TNG_FAILURE );
15192
15194
}
15193
15195
15194
15196
You can’t perform that action at this time.
0 commit comments