summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2017-05-23 17:13:30 +0200
committerDebarshi Ray <debarshir@gnome.org>2017-05-23 17:13:43 +0200
commit61049af2ee9dfe8d5113eafd3597395f8fe27029 (patch)
tree22a48befd6e953367e3622a2c56944d207fee954
parent965ac9144b5989859230cd859e675fd5dfb29eac (diff)
downloadvte-61049af2ee9dfe8d5113eafd3597395f8fe27029.tar.gz
Don't set variables to values that are never used
https://bugzilla.gnome.org/show_bug.cgi?id=783001
-rw-r--r--src/vterowdata.cc2
-rw-r--r--src/vtestream-file.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/vterowdata.cc b/src/vterowdata.cc
index 8fc48636..42b22e16 100644
--- a/src/vterowdata.cc
+++ b/src/vterowdata.cc
@@ -144,7 +144,7 @@ void _vte_row_data_remove (VteRowData *row, gulong col)
void _vte_row_data_fill (VteRowData *row, const VteCell *cell, gulong len)
{
if (row->len < len) {
- gulong i = len - row->len;
+ gulong i;
if (G_UNLIKELY (!_vte_row_data_ensure (row, len)))
return;
diff --git a/src/vtestream-file.h b/src/vtestream-file.h
index 697e02dd..c8dc89b9 100644
--- a/src/vtestream-file.h
+++ b/src/vtestream-file.h
@@ -931,8 +931,6 @@ _vte_boa_read (VteBoa *boa, gsize offset, char *data)
static void
_vte_boa_write (VteBoa *boa, gsize offset, const char *data)
{
- _vte_block_datalength_t compressed_len = boa->compressBound;
-
/* The overwrite counter is 1-based. This is to make sure that the IV is never 0: 738601#c88,
to make sure that an empty block (e.g. after a previous write failure) is always invalid,
and to make unit testing easier */
@@ -966,6 +964,8 @@ _vte_boa_write (VteBoa *boa, gsize offset, const char *data)
overwrite_counter++;
}
+ _vte_block_datalength_t compressed_len;
+
/* Compress, or copy if uncompressable */
compressed_len = _vte_boa_compress (buf + VTE_BLOCK_DATALENGTH_SIZE + VTE_OVERWRITE_COUNTER_SIZE, boa->compressBound,
data, VTE_BOA_BLOCKSIZE);