From 89048bb837708bdb5226c0f835b82736c330d869 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Thu, 19 Apr 2012 19:02:45 -0400 Subject: [PATCH] lib: fixed unused variable compiler warnings --- src/m_jvmdebug.cc | 9 +++++---- src/restore.cc | 4 +--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/m_jvmdebug.cc b/src/m_jvmdebug.cc index daf52fa8..a355d170 100644 --- a/src/m_jvmdebug.cc +++ b/src/m_jvmdebug.cc @@ -711,7 +711,6 @@ int JVMDebug::GetConsoleMessage(std::string &message) void JVMDebug::GetModulesList(JVMModulesList &mylist) { uint32_t size = 0; - uint32_t count = 0; uint32_t offset = 0; uint16_t expect = 0; @@ -746,7 +745,9 @@ void JVMDebug::GetModulesList(JVMModulesList &mylist) CheckSize(response, SB_JVMPACKET_HEADER_SIZE + SB_JVMMODULES_LIST_HEADER_SIZE + 4); // Number of modules entries in the list - count = be_btohl(dpack->u.moduleslist.nbr); + // (Valid, but unused variable... disabled to stop compiler + // warnings) +// uint32_t count = be_btohl(dpack->u.moduleslist.nbr); // Size of modules list // I remove the header of packet (contains the field 'number of modules') @@ -773,7 +774,6 @@ void JVMDebug::GetModulesList(JVMModulesList &mylist) void JVMDebug::GetThreadsList(JVMThreadsList &mylist) { uint32_t size = 0; - uint32_t count = 0; uint16_t expect = 0; Data command(-1, 8), response; @@ -804,7 +804,8 @@ void JVMDebug::GetThreadsList(JVMThreadsList &mylist) CheckSize(response, SB_JVMPACKET_HEADER_SIZE + SB_JVMTHREADS_LIST_HEADER_SIZE); // Number of threads entries in the list - count = be_btohl(dpack->u.threadslist.nbr); + // (Valid, but unused variable... disabled to stop compiler warnings) +// uint32_t count = be_btohl(dpack->u.threadslist.nbr); // Size of threads list // I remove the header of packet (contains the field 'number of threads') diff --git a/src/restore.cc b/src/restore.cc index 686a83e4..6b3e9d02 100644 --- a/src/restore.cc +++ b/src/restore.cc @@ -229,8 +229,6 @@ Barry::Restore::DBListType Restore::GetDBList() const Barry::Restore::DBListType Restore::GetDBList(const std::string &tarpath) { - unsigned int count = 0; - std::auto_ptr tar; DBListType available, empty; @@ -238,7 +236,7 @@ Barry::Restore::DBListType Restore::GetDBList(const std::string &tarpath) // do a scan through the tar file tar.reset( new reuse::TarFile(tarpath.c_str(), false, &reuse::gztar_ops_nonthread, true) ); - count = CountFiles(*tar, empty, &available, true); + CountFiles(*tar, empty, &available, true); return available; } catch( reuse::TarFile::TarError &te ) { -- 2.11.4.GIT