From 4e42e67fa291bd27b2ffb00be57a4ca9a5000526 Mon Sep 17 00:00:00 2001 From: Hidehiko Abe Date: Tue, 20 Feb 2018 12:04:01 +0900 Subject: Remove modification to deal with unused-parameter warning. libchrome used to hit unused-parameter warning. Now, libchrome is built with -Wno-unused-parameter flag, and its client libraries/executables are built with the header files containing pragma to suppress the warning from libchrome. Thus, the modification can be removed to reduce the diff from Chrome upstream. Bug: 73270448 Test: Built locally. Treehugger. Change-Id: I51b6349bfdb28ed15df1d12b836adccffabe53bb --- base/command_line.cc | 2 +- base/debug/alias.cc | 2 +- base/debug/profiler.cc | 2 +- base/files/dir_reader_fallback.h | 2 +- base/files/file_path.cc | 3 --- base/files/file_util_posix.cc | 4 +--- base/lazy_instance.h | 3 ++- base/logging.cc | 4 ++-- base/memory/ref_counted.h | 4 ++-- base/memory/shared_memory_android.cc | 4 ++-- base/memory/shared_memory_posix.cc | 2 +- base/message_loop/incoming_task_queue.cc | 1 - base/message_loop/message_pump_libevent.cc | 10 +++++----- base/metrics/histogram.cc | 2 +- base/metrics/histogram_base.cc | 2 +- base/metrics/histogram_samples.cc | 2 +- base/metrics/persistent_memory_allocator.cc | 2 +- base/metrics/sample_vector.cc | 2 +- base/metrics/sparse_histogram.cc | 6 +++--- base/metrics/statistics_recorder.cc | 2 +- base/pickle.cc | 6 +++--- base/process/process_posix.cc | 4 ++-- base/strings/utf_string_conversion_utils.cc | 2 +- base/sync_socket_posix.cc | 2 +- base/task/cancelable_task_tracker.cc | 2 +- base/third_party/nspr/prtime.cc | 2 +- base/threading/platform_thread_linux.cc | 2 +- base/threading/thread_restrictions.h | 2 +- base/threading/thread_task_runner_handle.cc | 2 +- base/threading/worker_pool_posix.cc | 2 +- base/trace_event/memory_dump_provider.h | 4 ++-- base/trace_event/memory_usage_estimator.h | 2 +- base/trace_event/trace_log.cc | 2 +- dbus/bus.cc | 12 ++++++------ dbus/exported_object.cc | 4 ++-- dbus/object_manager.cc | 10 +++++----- dbus/object_manager.h | 8 ++++---- dbus/object_proxy.cc | 2 +- dbus/property.cc | 2 +- 39 files changed, 64 insertions(+), 69 deletions(-) diff --git a/base/command_line.cc b/base/command_line.cc index b939201e5c..99ea2b0003 100644 --- a/base/command_line.cc +++ b/base/command_line.cc @@ -149,7 +149,7 @@ string16 QuoteForCommandLineToArgvW(const string16& arg, } // namespace -CommandLine::CommandLine(NoProgram /* no_program */) +CommandLine::CommandLine(NoProgram no_program) : argv_(1), begin_args_(1) { } diff --git a/base/debug/alias.cc b/base/debug/alias.cc index d49808491b..6b0caaa6d1 100644 --- a/base/debug/alias.cc +++ b/base/debug/alias.cc @@ -12,7 +12,7 @@ namespace debug { #pragma optimize("", off) #endif -void Alias(const void* /* var */) { +void Alias(const void* var) { } #if defined(COMPILER_MSVC) diff --git a/base/debug/profiler.cc b/base/debug/profiler.cc index e303c2891a..b19e7ecd00 100644 --- a/base/debug/profiler.cc +++ b/base/debug/profiler.cc @@ -63,7 +63,7 @@ bool IsProfilingSupported() { #else -void StartProfiling(const std::string&) { +void StartProfiling(const std::string& name) { } void StopProfiling() { diff --git a/base/files/dir_reader_fallback.h b/base/files/dir_reader_fallback.h index 4bc199a922..d44c2279e4 100644 --- a/base/files/dir_reader_fallback.h +++ b/base/files/dir_reader_fallback.h @@ -11,7 +11,7 @@ class DirReaderFallback { public: // Open a directory. If |IsValid| is true, then |Next| can be called to start // the iteration at the beginning of the directory. - explicit DirReaderFallback(const char* /* directory_path */) {} + explicit DirReaderFallback(const char* directory_path) {} // After construction, IsValid returns true iff the directory was // successfully opened. diff --git a/base/files/file_path.cc b/base/files/file_path.cc index 9f67f9bc49..8f7fcc2c58 100644 --- a/base/files/file_path.cc +++ b/base/files/file_path.cc @@ -53,8 +53,6 @@ StringPieceType::size_type FindDriveLetter(StringPieceType path) { (path[0] >= L'a' && path[0] <= L'z'))) { return 1; } -#else - (void)path; // Avoid an unused warning. #endif // FILE_PATH_USES_DRIVE_LETTERS return StringType::npos; } @@ -1328,7 +1326,6 @@ FilePath FilePath::NormalizePathSeparatorsTo(CharType separator) const { } return FilePath(copy); #else - (void)separator; // Avoid an unused warning. return *this; #endif } diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc index a03ca8d8d8..3501e241e9 100644 --- a/base/files/file_util_posix.cc +++ b/base/files/file_util_posix.cc @@ -628,7 +628,7 @@ bool CreateTemporaryDirInDir(const FilePath& base_dir, return CreateTemporaryDirInDirImpl(base_dir, mkdtemp_template, new_dir); } -bool CreateNewTempDirectory(const FilePath::StringType& /*prefix*/, +bool CreateNewTempDirectory(const FilePath::StringType& prefix, FilePath* new_temp_path) { FilePath tmpdir; if (!GetTempDir(&tmpdir)) @@ -934,8 +934,6 @@ bool GetShmemTempDir(bool executable, FilePath* path) { *path = FilePath("/dev/shm"); return true; } -#else - (void)executable; // Avoid unused warning when !defined(OS_LINUX). #endif return GetTempDir(path); } diff --git a/base/lazy_instance.h b/base/lazy_instance.h index 5481f905cc..b0d72bcbb5 100644 --- a/base/lazy_instance.h +++ b/base/lazy_instance.h @@ -113,7 +113,8 @@ struct LeakyLazyInstanceTraits { ANNOTATE_SCOPED_MEMORY_LEAK; return LazyInstanceTraitsBase::New(instance); } - static void Delete(Type*) {} + static void Delete(Type* instance) { + } }; template diff --git a/base/logging.cc b/base/logging.cc index a8736badd3..ad9d84a07f 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -207,7 +207,7 @@ class LoggingLock { UnlockLogging(); } - static void Init(LogLockingState lock_log, const PathChar* /*new_log_file*/) { + static void Init(LogLockingState lock_log, const PathChar* new_log_file) { if (initialized) return; lock_log_file = lock_log; @@ -474,7 +474,7 @@ template std::string* MakeCheckOpString( template std::string* MakeCheckOpString( const std::string&, const std::string&, const char* name); -void MakeCheckOpValueString(std::ostream* os, std::nullptr_t) { +void MakeCheckOpValueString(std::ostream* os, std::nullptr_t p) { (*os) << "nullptr"; } diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h index 9dd09ad346..ff46e6d6e5 100644 --- a/base/memory/ref_counted.h +++ b/base/memory/ref_counted.h @@ -427,12 +427,12 @@ bool operator==(const T* lhs, const scoped_refptr& rhs) { } template -bool operator==(const scoped_refptr& lhs, std::nullptr_t) { +bool operator==(const scoped_refptr& lhs, std::nullptr_t null) { return !static_cast(lhs); } template -bool operator==(std::nullptr_t, const scoped_refptr& rhs) { +bool operator==(std::nullptr_t null, const scoped_refptr& rhs) { return !static_cast(rhs); } diff --git a/base/memory/shared_memory_android.cc b/base/memory/shared_memory_android.cc index 5ac6776b25..dffd1e3712 100644 --- a/base/memory/shared_memory_android.cc +++ b/base/memory/shared_memory_android.cc @@ -57,13 +57,13 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) { return true; } -bool SharedMemory::Delete(const std::string&) { +bool SharedMemory::Delete(const std::string& name) { // Like on Windows, this is intentionally returning true as ashmem will // automatically releases the resource when all FDs on it are closed. return true; } -bool SharedMemory::Open(const std::string&, bool /*read_only*/) { +bool SharedMemory::Open(const std::string& name, bool read_only) { // ashmem doesn't support name mapping NOTIMPLEMENTED(); return false; diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc index fb1a343906..e5f67bd1e6 100644 --- a/base/memory/shared_memory_posix.cc +++ b/base/memory/shared_memory_posix.cc @@ -359,7 +359,7 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name, } #endif // !defined(OS_ANDROID) && !defined(__ANDROID__) -bool SharedMemory::ShareToProcessCommon(ProcessHandle, +bool SharedMemory::ShareToProcessCommon(ProcessHandle process, SharedMemoryHandle* new_handle, bool close_self, ShareMode share_mode) { diff --git a/base/message_loop/incoming_task_queue.cc b/base/message_loop/incoming_task_queue.cc index 762e6100b3..f0df650adc 100644 --- a/base/message_loop/incoming_task_queue.cc +++ b/base/message_loop/incoming_task_queue.cc @@ -34,7 +34,6 @@ bool AlwaysNotifyPump(MessageLoop::Type type) { // to the incoming queue. return type == MessageLoop::TYPE_UI || type == MessageLoop::TYPE_JAVA; #else - (void)type; // Avoid an unused warning. return false; #endif } diff --git a/base/message_loop/message_pump_libevent.cc b/base/message_loop/message_pump_libevent.cc index 86f5faa056..1cbde8ac18 100644 --- a/base/message_loop/message_pump_libevent.cc +++ b/base/message_loop/message_pump_libevent.cc @@ -90,7 +90,7 @@ event* MessagePumpLibevent::FileDescriptorWatcher::ReleaseEvent() { void MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking( int fd, - MessagePumpLibevent*) { + MessagePumpLibevent* pump) { // Since OnFileCanWriteWithoutBlocking() gets called first, it can stop // watching the file descriptor. if (!watcher_) @@ -100,7 +100,7 @@ void MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking( void MessagePumpLibevent::FileDescriptorWatcher::OnFileCanWriteWithoutBlocking( int fd, - MessagePumpLibevent*) { + MessagePumpLibevent* pump) { DCHECK(watcher_); watcher_->OnFileCanWriteWithoutBlocking(fd); } @@ -199,8 +199,8 @@ bool MessagePumpLibevent::WatchFileDescriptor(int fd, } // Tell libevent to break out of inner loop. -static void timer_callback(int /*fd*/, short /*events*/, void* context) { - event_base_loopbreak((struct event_base *)context); +static void timer_callback(int fd, short events, void* context) { + event_base_loopbreak((struct event_base*)context); } // Reentrant! @@ -345,7 +345,7 @@ void MessagePumpLibevent::OnLibeventNotification(int fd, // Called if a byte is received on the wakeup pipe. // static -void MessagePumpLibevent::OnWakeup(int socket, short /*flags*/, void* context) { +void MessagePumpLibevent::OnWakeup(int socket, short flags, void* context) { MessagePumpLibevent* that = static_cast(context); DCHECK(that->wakeup_pipe_out_ == socket); diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc index d455c87b0f..16e36ae4b0 100644 --- a/base/metrics/histogram.cc +++ b/base/metrics/histogram.cc @@ -130,7 +130,7 @@ class Histogram::Factory { // Perform any required datafill on the just-created histogram. If // overridden, be sure to call the "super" version -- this method may not // always remain empty. - virtual void FillHistogram(HistogramBase* /*histogram*/) {} + virtual void FillHistogram(HistogramBase* histogram) {} // These values are protected (instead of private) because they need to // be accessible to methods of sub-classes in order to avoid passing diff --git a/base/metrics/histogram_base.cc b/base/metrics/histogram_base.cc index 396f29739a..671cad2429 100644 --- a/base/metrics/histogram_base.cc +++ b/base/metrics/histogram_base.cc @@ -97,7 +97,7 @@ bool HistogramBase::SerializeInfo(Pickle* pickle) const { return SerializeInfoImpl(pickle); } -uint32_t HistogramBase::FindCorruption(const HistogramSamples& /* samples */) const { +uint32_t HistogramBase::FindCorruption(const HistogramSamples& samples) const { // Not supported by default. return NO_INCONSISTENCIES; } diff --git a/base/metrics/histogram_samples.cc b/base/metrics/histogram_samples.cc index ea3b9874b3..3475cd59f7 100644 --- a/base/metrics/histogram_samples.cc +++ b/base/metrics/histogram_samples.cc @@ -147,7 +147,7 @@ void HistogramSamples::IncreaseRedundantCount(HistogramBase::Count diff) { SampleCountIterator::~SampleCountIterator() {} -bool SampleCountIterator::GetBucketIndex(size_t* /*index*/) const { +bool SampleCountIterator::GetBucketIndex(size_t* index) const { DCHECK(!Done()); return false; } diff --git a/base/metrics/persistent_memory_allocator.cc b/base/metrics/persistent_memory_allocator.cc index abcc532242..d381d8784d 100644 --- a/base/metrics/persistent_memory_allocator.cc +++ b/base/metrics/persistent_memory_allocator.cc @@ -872,7 +872,7 @@ PersistentMemoryAllocator::GetBlock(Reference ref, uint32_t type_id, return reinterpret_cast(mem_base_ + ref); } -void PersistentMemoryAllocator::FlushPartial(size_t /*length*/, bool /*sync*/) { +void PersistentMemoryAllocator::FlushPartial(size_t length, bool sync) { // Generally there is nothing to do as every write is done through volatile // memory with atomic instructions to guarantee consistency. This (virtual) // method exists so that derivced classes can do special things, such as diff --git a/base/metrics/sample_vector.cc b/base/metrics/sample_vector.cc index 7b056cb3fd..477b8aff8c 100644 --- a/base/metrics/sample_vector.cc +++ b/base/metrics/sample_vector.cc @@ -26,7 +26,7 @@ SampleVector::SampleVector(uint64_t id, const BucketRanges* bucket_ranges) SampleVector::SampleVector(uint64_t id, HistogramBase::AtomicCount* counts, - size_t /*counts_size*/, + size_t counts_size, Metadata* meta, const BucketRanges* bucket_ranges) : HistogramSamples(id, meta), diff --git a/base/metrics/sparse_histogram.cc b/base/metrics/sparse_histogram.cc index bee48d4c17..cca76bfee7 100644 --- a/base/metrics/sparse_histogram.cc +++ b/base/metrics/sparse_histogram.cc @@ -93,9 +93,9 @@ HistogramType SparseHistogram::GetHistogramType() const { } bool SparseHistogram::HasConstructionArguments( - Sample /*expected_minimum*/, - Sample /*expected_maximum*/, - uint32_t /*expected_bucket_count*/) const { + Sample expected_minimum, + Sample expected_maximum, + uint32_t expected_bucket_count) const { // SparseHistogram never has min/max/bucket_count limit. return false; } diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc index 74c964a3fb..ba2101bccf 100644 --- a/base/metrics/statistics_recorder.cc +++ b/base/metrics/statistics_recorder.cc @@ -520,7 +520,7 @@ void StatisticsRecorder::Reset() { } // static -void StatisticsRecorder::DumpHistogramsToVlog(void* /*instance*/) { +void StatisticsRecorder::DumpHistogramsToVlog(void* instance) { std::string output; StatisticsRecorder::WriteGraph(std::string(), &output); VLOG(1) << output; diff --git a/base/pickle.cc b/base/pickle.cc index 0079b3979b..02f39b57b7 100644 --- a/base/pickle.cc +++ b/base/pickle.cc @@ -363,12 +363,12 @@ void Pickle::Reserve(size_t length) { Resize(capacity_after_header_ * 2 + new_size); } -bool Pickle::WriteAttachment(scoped_refptr /*attachment*/) { +bool Pickle::WriteAttachment(scoped_refptr attachment) { return false; } -bool Pickle::ReadAttachment(base::PickleIterator* /*iter*/, - scoped_refptr* /*attachment*/) const { +bool Pickle::ReadAttachment(base::PickleIterator* iter, + scoped_refptr* attachment) const { return false; } diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc index a1d84e9128..db525f0355 100644 --- a/base/process/process_posix.cc +++ b/base/process/process_posix.cc @@ -311,7 +311,7 @@ void Process::Close() { } #if !defined(OS_NACL_NONSFI) -bool Process::Terminate(int /*exit_code*/, bool wait) const { +bool Process::Terminate(int exit_code, bool wait) const { // exit_code isn't supportable. DCHECK(IsValid()); CHECK_GT(process_, 0); @@ -383,7 +383,7 @@ bool Process::IsProcessBackgrounded() const { return false; } -bool Process::SetProcessBackgrounded(bool /*value*/) { +bool Process::SetProcessBackgrounded(bool value) { // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if // we were to lower the process priority we wouldn't be able to raise it back // to its initial priority. diff --git a/base/strings/utf_string_conversion_utils.cc b/base/strings/utf_string_conversion_utils.cc index 22058a5aff..3101a60288 100644 --- a/base/strings/utf_string_conversion_utils.cc +++ b/base/strings/utf_string_conversion_utils.cc @@ -55,7 +55,7 @@ bool ReadUnicodeCharacter(const char16* src, #if defined(WCHAR_T_IS_UTF32) bool ReadUnicodeCharacter(const wchar_t* src, - int32_t /*src_len*/, + int32_t src_len, int32_t* char_index, uint32_t* code_point) { // Conversion is easy since the source is 32-bit. diff --git a/base/sync_socket_posix.cc b/base/sync_socket_posix.cc index 995c8e933f..5d9e25e5ea 100644 --- a/base/sync_socket_posix.cc +++ b/base/sync_socket_posix.cc @@ -105,7 +105,7 @@ SyncSocket::Handle SyncSocket::UnwrapHandle( return descriptor.fd; } -bool SyncSocket::PrepareTransitDescriptor(ProcessHandle /*peer_process_handle*/, +bool SyncSocket::PrepareTransitDescriptor(ProcessHandle peer_process_handle, TransitDescriptor* descriptor) { descriptor->fd = handle(); descriptor->auto_close = false; diff --git a/base/task/cancelable_task_tracker.cc b/base/task/cancelable_task_tracker.cc index 9999c18303..2a68a57bc6 100644 --- a/base/task/cancelable_task_tracker.cc +++ b/base/task/cancelable_task_tracker.cc @@ -32,7 +32,7 @@ void RunIfNotCanceledThenUntrack(const CancellationFlag* flag, } bool IsCanceled(const CancellationFlag* flag, - base::ScopedClosureRunner* /*cleanup_runner*/) { + base::ScopedClosureRunner* cleanup_runner) { return flag->IsSet(); } diff --git a/base/third_party/nspr/prtime.cc b/base/third_party/nspr/prtime.cc index 97d2c27c79..c125160de6 100644 --- a/base/third_party/nspr/prtime.cc +++ b/base/third_party/nspr/prtime.cc @@ -379,7 +379,7 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params) */ PRTimeParameters -PR_GMTParameters(const PRExplodedTime* /*gmt*/) +PR_GMTParameters(const PRExplodedTime *gmt) { PRTimeParameters retVal = { 0, 0 }; return retVal; diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc index 474410f18a..92fbda5ee1 100644 --- a/base/threading/platform_thread_linux.cc +++ b/base/threading/platform_thread_linux.cc @@ -173,7 +173,7 @@ void InitThreading() {} void TerminateOnThread() {} -size_t GetDefaultThreadStackSize(const pthread_attr_t& /*attributes*/) { +size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { #if !defined(THREAD_SANITIZER) return 0; #else diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index ad8b4ba629..8f3beb1d1a 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -228,7 +228,7 @@ class BASE_EXPORT ThreadRestrictions { #if DCHECK_IS_ON() static bool SetWaitAllowed(bool allowed); #else - static bool SetWaitAllowed(bool) { return true; } + static bool SetWaitAllowed(bool allowed) { return true; } #endif // Constructing a ScopedAllowWait temporarily allows waiting on the current diff --git a/base/threading/thread_task_runner_handle.cc b/base/threading/thread_task_runner_handle.cc index 00deaa4e20..d71cabb135 100644 --- a/base/threading/thread_task_runner_handle.cc +++ b/base/threading/thread_task_runner_handle.cc @@ -54,7 +54,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting( std::unique_ptr top_level_ttrh = MakeUnique(std::move(overriding_task_runner)); return ScopedClosureRunner(base::Bind( - [](std::unique_ptr) {}, + [](std::unique_ptr ttrh_to_release) {}, base::Passed(&top_level_ttrh))); } diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc index 2133ba98e2..e0efa463f7 100644 --- a/base/threading/worker_pool_posix.cc +++ b/base/threading/worker_pool_posix.cc @@ -62,7 +62,7 @@ WorkerPoolImpl::WorkerPoolImpl() void WorkerPoolImpl::PostTask(const tracked_objects::Location& from_here, base::Closure task, - bool /*task_is_slow*/) { + bool task_is_slow) { pool_->PostTask(from_here, std::move(task)); } diff --git a/base/trace_event/memory_dump_provider.h b/base/trace_event/memory_dump_provider.h index 76c2969e96..244319efa7 100644 --- a/base/trace_event/memory_dump_provider.h +++ b/base/trace_event/memory_dump_provider.h @@ -56,14 +56,14 @@ class BASE_EXPORT MemoryDumpProvider { // Called by the MemoryDumpManager when an allocator should start or stop // collecting extensive allocation data, if supported. - virtual void OnHeapProfilingEnabled(bool) {} + virtual void OnHeapProfilingEnabled(bool enabled) {} // Quickly record the total memory usage in |memory_total|. This method will // be called only when the dump provider registration has // |is_fast_polling_supported| set to true. This method is used for polling at // high frequency for detecting peaks. See comment on // |is_fast_polling_supported| option if you need to override this method. - virtual void PollFastMemoryTotal(uint64_t* /* memory_total */) {} + virtual void PollFastMemoryTotal(uint64_t* memory_total) {} // Indicates that fast memory polling is not going to be used in the near // future and the MDP can tear down any resource kept around for fast memory diff --git a/base/trace_event/memory_usage_estimator.h b/base/trace_event/memory_usage_estimator.h index db4ea6956c..6f02bb93bb 100644 --- a/base/trace_event/memory_usage_estimator.h +++ b/base/trace_event/memory_usage_estimator.h @@ -208,7 +208,7 @@ struct EMUCaller< T, typename std::enable_if::value && is_trivially_destructible::value>::type> { - static size_t Call(const T&) { return 0; } + static size_t Call(const T& value) { return 0; } }; // Returns reference to the underlying container of a container adapter. diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc index dbdd4db06a..d08030e709 100644 --- a/base/trace_event/trace_log.cc +++ b/base/trace_event/trace_log.cc @@ -303,7 +303,7 @@ void TraceLog::ThreadLocalEventBuffer::WillDestroyCurrentMessageLoop() { delete this; } -bool TraceLog::ThreadLocalEventBuffer::OnMemoryDump(const MemoryDumpArgs&, +bool TraceLog::ThreadLocalEventBuffer::OnMemoryDump(const MemoryDumpArgs& args, ProcessMemoryDump* pmd) { if (!chunk_) return true; diff --git a/dbus/bus.cc b/dbus/bus.cc index b6a13d6b15..a86971736f 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc @@ -84,13 +84,13 @@ class Watch : public base::MessagePumpLibevent::Watcher { private: // Implement MessagePumpLibevent::Watcher. - void OnFileCanReadWithoutBlocking(int /*file_descriptor*/) override { + void OnFileCanReadWithoutBlocking(int file_descriptor) override { const bool success = dbus_watch_handle(raw_watch_, DBUS_WATCH_READABLE); CHECK(success) << "Unable to allocate memory"; } // Implement MessagePumpLibevent::Watcher. - void OnFileCanWriteWithoutBlocking(int /*file_descriptor*/) override { + void OnFileCanWriteWithoutBlocking(int file_descriptor) override { const bool success = dbus_watch_handle(raw_watch_, DBUS_WATCH_WRITABLE); CHECK(success) << "Unable to allocate memory"; } @@ -1090,7 +1090,7 @@ void Bus::OnToggleTimeout(DBusTimeout* raw_timeout) { } void Bus::OnDispatchStatusChanged(DBusConnection* connection, - DBusDispatchStatus /*status*/) { + DBusDispatchStatus status) { DCHECK_EQ(connection, connection_); AssertOnDBusThread(); @@ -1187,9 +1187,9 @@ void Bus::OnDispatchStatusChangedThunk(DBusConnection* connection, // static DBusHandlerResult Bus::OnConnectionDisconnectedFilter( - DBusConnection* /*connection*/, + DBusConnection* connection, DBusMessage* message, - void* /*data*/) { + void* data) { if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, kDisconnectedSignal)) { @@ -1201,7 +1201,7 @@ DBusHandlerResult Bus::OnConnectionDisconnectedFilter( // static DBusHandlerResult Bus::OnServiceOwnerChangedFilter( - DBusConnection* /*connection*/, + DBusConnection* connection, DBusMessage* message, void* data) { if (dbus_message_is_signal(message, diff --git a/dbus/exported_object.cc b/dbus/exported_object.cc index ffc5eb391d..0024df6c28 100644 --- a/dbus/exported_object.cc +++ b/dbus/exported_object.cc @@ -187,7 +187,7 @@ bool ExportedObject::Register() { } DBusHandlerResult ExportedObject::HandleMessage( - DBusConnection* /*connection*/, + DBusConnection* connection, DBusMessage* raw_message) { bus_->AssertOnDBusThread(); DCHECK_EQ(DBUS_MESSAGE_TYPE_METHOD_CALL, dbus_message_get_type(raw_message)); @@ -301,7 +301,7 @@ void ExportedObject::OnMethodCompleted(std::unique_ptr method_call, base::TimeTicks::Now() - start_time); } -void ExportedObject::OnUnregistered(DBusConnection* /*connection*/) { +void ExportedObject::OnUnregistered(DBusConnection* connection) { } DBusHandlerResult ExportedObject::HandleMessageThunk( diff --git a/dbus/object_manager.cc b/dbus/object_manager.cc index 08e6e048e2..3a39cd6fb6 100644 --- a/dbus/object_manager.cc +++ b/dbus/object_manager.cc @@ -249,7 +249,7 @@ DBusHandlerResult ObjectManager::HandleMessageThunk(DBusConnection* connection, return self->HandleMessage(connection, raw_message); } -DBusHandlerResult ObjectManager::HandleMessage(DBusConnection* /*connection*/, +DBusHandlerResult ObjectManager::HandleMessage(DBusConnection* connection, DBusMessage* raw_message) { DCHECK(bus_); bus_->AssertOnDBusThread(); @@ -385,8 +385,8 @@ void ObjectManager::InterfacesAddedReceived(Signal* signal) { UpdateObject(object_path, &reader); } -void ObjectManager::InterfacesAddedConnected(const std::string& /*interface_name*/, - const std::string& /*signal_name*/, +void ObjectManager::InterfacesAddedConnected(const std::string& interface_name, + const std::string& signal_name, bool success) { LOG_IF(WARNING, !success) << service_name_ << " " << object_path_.value() << ": Failed to connect to InterfacesAdded signal."; @@ -410,8 +410,8 @@ void ObjectManager::InterfacesRemovedReceived(Signal* signal) { } void ObjectManager::InterfacesRemovedConnected( - const std::string& /*interface_name*/, - const std::string& /*signal_name*/, + const std::string& interface_name, + const std::string& signal_name, bool success) { LOG_IF(WARNING, !success) << service_name_ << " " << object_path_.value() << ": Failed to connect to " diff --git a/dbus/object_manager.h b/dbus/object_manager.h index 90cf919639..842a1378a2 100644 --- a/dbus/object_manager.h +++ b/dbus/object_manager.h @@ -167,8 +167,8 @@ public: // called on each interface implementation with differing values of // |interface_name| as appropriate. An implementation class will only // receive multiple calls if it has registered for multiple interfaces. - virtual void ObjectAdded(const ObjectPath& /*object_path*/, - const std::string& /*interface_name*/) { } + virtual void ObjectAdded(const ObjectPath& object_path, + const std::string& interface_name) { } // Called by ObjectManager to inform the implementation class than an // object with the path |object_path| has been removed. Ths D-Bus interface @@ -179,8 +179,8 @@ public: // This method will be called before the Properties structure and the // ObjectProxy object for the given interface are cleaned up, it is safe // to retrieve them during removal to vary processing. - virtual void ObjectRemoved(const ObjectPath& /*object_path*/, - const std::string& /*interface_name*/) { } + virtual void ObjectRemoved(const ObjectPath& object_path, + const std::string& interface_name) { } }; // Client code should use Bus::GetObjectManager() instead of this constructor. diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc index 50e62a3a99..15f20c76c0 100644 --- a/dbus/object_proxy.cc +++ b/dbus/object_proxy.cc @@ -460,7 +460,7 @@ void ObjectProxy::WaitForServiceToBeAvailableInternal() { } DBusHandlerResult ObjectProxy::HandleMessage( - DBusConnection* /*connection*/, + DBusConnection* connection, DBusMessage* raw_message) { bus_->AssertOnDBusThread(); diff --git a/dbus/property.cc b/dbus/property.cc index 93f9ed693c..0351c4a59a 100644 --- a/dbus/property.cc +++ b/dbus/property.cc @@ -91,7 +91,7 @@ void PropertySet::ChangedReceived(Signal* signal) { } } -void PropertySet::ChangedConnected(const std::string& /*interface_name*/, +void PropertySet::ChangedConnected(const std::string& interface_name, const std::string& signal_name, bool success) { LOG_IF(WARNING, !success) << "Failed to connect to " << signal_name -- cgit v1.2.3