From e679b1cdfc288004dcbc59a47a606728b5ad6ff4 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Feb 2013 12:29:28 -0500 Subject: fix unused return from fwrite --- indra/newview/llviewerstatsrecorder.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 91e485d01b..321684bf3f 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -187,6 +187,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << mObjectUpdateFailures << " update failures" << llendl; + U32 data_size; if (mObjectCacheFile == NULL) { mStartTime = LLTimer::getTotalSeconds(); @@ -216,7 +217,11 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Texture Fetch bps\t" << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + data_size = data_msg.str().size(); + if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) + { + llwarns << "failed to write full headers to " << STATS_FILE_NAME << llendl; + } } else { @@ -249,7 +254,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\t" << (mTextureFetchSize * 8 / delta_time) << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + data_size = data_msg.str().size(); + if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) + { + llwarns << "failed to write full stats to " << STATS_FILE_NAME << llendl; + } + clearStats(); } -- cgit v1.2.3 From 20e64fc6db5de1e025ebd443b54350331b4f14cf Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Feb 2013 13:08:03 -0500 Subject: fix fat-finger fix --- indra/newview/llviewerstatsrecorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 321684bf3f..f9a725547f 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -255,7 +255,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\n"; data_size = data_msg.str().size(); - if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) + if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) { llwarns << "failed to write full stats to " << STATS_FILE_NAME << llendl; } -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/newview/llviewerstatsrecorder.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/llviewerstatsrecorder.cpp (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From e89e4bf6019606580ebc2c3869bdcdd4e207fae0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 02:30:44 -0700 Subject: Fix unused return val from fwrite causing warnings causing errors --- indra/newview/llviewerstatsrecorder.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 91e485d01b..a63ea69ede 100755 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -216,7 +216,9 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Texture Fetch bps\t" << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + size_t wrote = fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + llassert(wrote == data_msg.str().size()); + (void)wrote; } else { @@ -249,7 +251,9 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\t" << (mTextureFetchSize * 8 / delta_time) << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + size_t data_written = fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + llassert(data_written == data_msg.str().size()); + (void)data_written; clearStats(); } -- cgit v1.2.3