From 06b80ebc0e762dd042b1bc8a206d28e393651500 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 21 Nov 2008 16:53:58 +0000 Subject: [PATCH] (libT) silence a compiler warning --- libtransmission/stats.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libtransmission/stats.c b/libtransmission/stats.c index 7c41b984a..5abaed06a 100644 --- a/libtransmission/stats.c +++ b/libtransmission/stats.c @@ -20,6 +20,8 @@ **** ***/ +static struct tr_session_stats STATS_INIT = { 0.0f, 0, 0, 0, 0, 0 }; + struct tr_stats_handle { tr_session_stats single; @@ -117,7 +119,7 @@ tr_statsInit( tr_handle * handle ) void tr_statsClose( tr_handle * handle ) { - tr_session_stats cumulative; + tr_session_stats cumulative = STATS_INIT; tr_sessionGetCumulativeStats( handle, &cumulative ); saveCumulativeStats( handle, &cumulative ); @@ -174,7 +176,7 @@ tr_sessionGetCumulativeStats( const tr_handle * handle, tr_session_stats * setme ) { const struct tr_stats_handle * stats = getStats( handle ); - tr_session_stats current; + tr_session_stats current = STATS_INIT; if( stats ) {