The "secs" field of a "struct wtap_nstime" is a time_t, so it could be

an int or it could be a long; print stuff computed from it with %lu, and
cast the arguments to "long" so that it works on platforms where time_t
*isn't* a long and where "long int" and "int" have different sizes.

svn path=/trunk/; revision=15523
This commit is contained in:
Guy Harris 2005-08-25 01:16:40 +00:00
parent 72e862b129
commit 16e2c6605d
1 changed files with 4 additions and 2 deletions

View File

@ -1219,9 +1219,11 @@ set_display_filename(capture_file *cf)
}
/* statusbar */
status_msg = g_strdup_printf(" File: \"%s\" %s %02u:%02u:%02u",
status_msg = g_strdup_printf(" File: \"%s\" %s %02lu:%02lu:%02lu",
(cf->filename) ? cf->filename : "", size_str,
cf->elapsed_time.secs/3600, cf->elapsed_time.secs%3600/60, cf->elapsed_time.secs%60);
(long)cf->elapsed_time.secs/3600,
(long)cf->elapsed_time.secs%3600/60,
(long)cf->elapsed_time.secs%60);
g_free(size_str);
statusbar_push_file_msg(status_msg);
g_free(status_msg);