summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 22:38:46 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 22:38:46 +0000
commitafb7acafbee71fd08510e3a4a8057320649d99b5 (patch)
tree29623a2827df60efd6b02d7a5fa99f3d6353a8df /remoting
parent09d62168b2d507600cad023b79a7741d418129b3 (diff)
downloadchromium_src-afb7acafbee71fd08510e3a4a8057320649d99b5.zip
chromium_src-afb7acafbee71fd08510e3a4a8057320649d99b5.tar.gz
chromium_src-afb7acafbee71fd08510e3a4a8057320649d99b5.tar.bz2
Fix broken build.
TEST=build release BUG=none Review URL: http://codereview.chromium.org/2800004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/plugin/compression.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/remoting/client/plugin/compression.cc b/remoting/client/plugin/compression.cc
index 037aefb..d574dff 100644
--- a/remoting/client/plugin/compression.cc
+++ b/remoting/client/plugin/compression.cc
@@ -29,7 +29,12 @@ void ZCompressor::WriteInternal(char* buffer, int size, int flush) {
stream_.avail_out = kZLIB_CHUNK;
stream_.next_out = reinterpret_cast<Bytef*>(&buffer_[last_size]);
int ret = deflate(&stream_, flush);
- assert(ret != Z_STREAM_ERROR);
+
+ // Check ret before the assert so that we don't get an unused variable
+ // warning in release builds.
+ if (ret == Z_STREAM_ERROR) {
+ assert(ret != Z_STREAM_ERROR);
+ }
// Shrink the size of the vector. It doesn't alter the capacity.
int compressed = kZLIB_CHUNK - stream_.avail_out;
@@ -81,7 +86,12 @@ void ZDecompressor::WriteInternal(char* buffer, int size, int flush) {
stream_.avail_out = kZLIB_CHUNK;
stream_.next_out = reinterpret_cast<Bytef*>(&buffer_[last_size]);
int ret = inflate(&stream_, flush);
- assert(ret != Z_STREAM_ERROR);
+
+ // Check ret before the assert so that we don't get an unused variable
+ // warning in release builds.
+ if (ret == Z_STREAM_ERROR) {
+ assert(ret != Z_STREAM_ERROR);
+ }
// Shrink the size of the vector. It doesn't alter the capacity.
int decompressed = kZLIB_CHUNK - stream_.avail_out;