[vte] Don't set variables to values that are never used
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Don't set variables to values that are never used
- Date: Wed, 24 May 2017 14:45:38 +0000 (UTC)
commit 61049af2ee9dfe8d5113eafd3597395f8fe27029
Author: Debarshi Ray <debarshir gnome org>
Date: Tue May 23 17:13:30 2017 +0200
Don't set variables to values that are never used
https://bugzilla.gnome.org/show_bug.cgi?id=783001
src/vterowdata.cc | 2 +-
src/vtestream-file.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vterowdata.cc b/src/vterowdata.cc
index 8fc4863..42b22e1 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 697e02d..c8dc89b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]