diff options
author | Debarshi Ray <debarshir@gnome.org> | 2017-05-23 17:13:30 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2017-05-23 17:13:43 +0200 |
commit | 61049af2ee9dfe8d5113eafd3597395f8fe27029 (patch) | |
tree | 22a48befd6e953367e3622a2c56944d207fee954 | |
parent | 965ac9144b5989859230cd859e675fd5dfb29eac (diff) | |
download | vte-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.cc | 2 | ||||
-rw-r--r-- | src/vtestream-file.h | 4 |
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); |