OSDN Git Service

ART: Fix "unused parameters"
authorAndreas Gampe <agampe@google.com>
Wed, 25 Feb 2015 04:55:16 +0000 (20:55 -0800)
committerAndreas Gampe <agampe@google.com>
Wed, 25 Feb 2015 04:55:16 +0000 (20:55 -0800)
GCC 4.8 decides that parameters for functions implemented with
"= default" are unused. This currently only impacts x86, but remove
the parameter names anyways.

Change-Id: I01865faa81af68c4c0e0b1cb1fb19e88ef548769

cmdline/cmdline_parse_result.h
cmdline/cmdline_parser.h
cmdline/cmdline_result.h
cmdline/cmdline_types.h
cmdline/token_range.h
runtime/base/arena_containers.h
runtime/base/scoped_arena_containers.h
runtime/base/variant_map.h

index d6ac341..717642f 100644 (file)
@@ -117,9 +117,9 @@ struct CmdlineParseResult : CmdlineResult {
   }
 
   // Make sure copying is allowed
-  CmdlineParseResult(const CmdlineParseResult& other) = default;
+  CmdlineParseResult(const CmdlineParseResult&) = default;
   // Make sure moving is cheap
-  CmdlineParseResult(CmdlineParseResult&& other) = default;
+  CmdlineParseResult(CmdlineParseResult&&) = default;
 
  private:
   explicit CmdlineParseResult(const T& value)
index a555356..e4af4f9 100644 (file)
@@ -490,9 +490,9 @@ struct CmdlineParser {
   }
 
   // Ensure we have a default move constructor.
-  CmdlineParser(CmdlineParser&& other) = default;
+  CmdlineParser(CmdlineParser&&) = default;
   // Ensure we have a default move assignment operator.
-  CmdlineParser& operator=(CmdlineParser&& other) = default;
+  CmdlineParser& operator=(CmdlineParser&&) = default;
 
  private:
   friend struct Builder;
index bf3a85d..963dfc1 100644 (file)
@@ -65,9 +65,9 @@ namespace art {
     }
 
     // Make sure copying exists
-    CmdlineResult(const CmdlineResult& other) = default;
+    CmdlineResult(const CmdlineResult&) = default;
     // Make sure moving is cheap
-    CmdlineResult(CmdlineResult&& other) = default;
+    CmdlineResult(CmdlineResult&&) = default;
 
   private:
     const Status status_;
index 180baec..2667121 100644 (file)
@@ -337,8 +337,8 @@ struct MillisecondsToNanoseconds {
 
   // Default constructors/copy-constructors.
   MillisecondsToNanoseconds() : nanoseconds_(0ul) {}
-  MillisecondsToNanoseconds(const MillisecondsToNanoseconds& rhs) = default;
-  MillisecondsToNanoseconds(MillisecondsToNanoseconds&& rhs) = default;
+  MillisecondsToNanoseconds(const MillisecondsToNanoseconds&) = default;
+  MillisecondsToNanoseconds(MillisecondsToNanoseconds&&) = default;
 
  private:
   uint64_t nanoseconds_;
@@ -421,8 +421,8 @@ struct ParseStringList {
   }
 
   ParseStringList() = default;
-  ParseStringList(const ParseStringList& rhs) = default;
-  ParseStringList(ParseStringList&& rhs) = default;
+  ParseStringList(const ParseStringList&) = default;
+  ParseStringList(ParseStringList&&) = default;
 
  private:
   std::vector<std::string> list_;
@@ -651,8 +651,8 @@ struct TestProfilerOptions {
     max_stack_depth_(0) {
   }
 
-  TestProfilerOptions(const TestProfilerOptions& other) = default;
-  TestProfilerOptions(TestProfilerOptions&& other) = default;
+  TestProfilerOptions(const TestProfilerOptions&) = default;
+  TestProfilerOptions(TestProfilerOptions&&) = default;
 };
 
 static inline std::ostream& operator<<(std::ostream& stream, const TestProfilerOptions& options) {
index 50c54fe..5b54384 100644 (file)
@@ -90,10 +90,10 @@ struct TokenRange {
   }
 
   // Non-copying copy constructor.
-  TokenRange(const TokenRange& other) = default;
+  TokenRange(const TokenRange&) = default;
 
   // Non-copying move constructor.
-  TokenRange(TokenRange&& other) = default;
+  TokenRange(TokenRange&&) = default;
 
   // Non-copying constructor. Retains reference to an existing list of tokens, with offset.
   explicit TokenRange(std::shared_ptr<TokenList> token_list)
index 162eb16..ceff6e8 100644 (file)
@@ -66,8 +66,8 @@ template <>
 class ArenaAllocatorAdapterKindImpl<false> {
  public:
   // Not tracking allocations, ignore the supplied kind and arbitrarily provide kArenaAllocSTL.
-  explicit ArenaAllocatorAdapterKindImpl(ArenaAllocKind kind) { UNUSED(kind); }
-  ArenaAllocatorAdapterKindImpl& operator=(const ArenaAllocatorAdapterKindImpl& other) = default;
+  explicit ArenaAllocatorAdapterKindImpl(ArenaAllocKind kind ATTRIBUTE_UNUSED) {}
+  ArenaAllocatorAdapterKindImpl& operator=(const ArenaAllocatorAdapterKindImpl&) = default;
   ArenaAllocKind Kind() { return kArenaAllocSTL; }
 };
 
@@ -75,7 +75,7 @@ template <bool kCount>
 class ArenaAllocatorAdapterKindImpl {
  public:
   explicit ArenaAllocatorAdapterKindImpl(ArenaAllocKind kind) : kind_(kind) { }
-  ArenaAllocatorAdapterKindImpl& operator=(const ArenaAllocatorAdapterKindImpl& other) = default;
+  ArenaAllocatorAdapterKindImpl& operator=(const ArenaAllocatorAdapterKindImpl&) = default;
   ArenaAllocKind Kind() { return kind_; }
 
  private:
@@ -109,8 +109,8 @@ class ArenaAllocatorAdapter<void>
         ArenaAllocatorAdapterKind(other),
         arena_allocator_(other.arena_allocator_) {
   }
-  ArenaAllocatorAdapter(const ArenaAllocatorAdapter& other) = default;
-  ArenaAllocatorAdapter& operator=(const ArenaAllocatorAdapter& other) = default;
+  ArenaAllocatorAdapter(const ArenaAllocatorAdapter&) = default;
+  ArenaAllocatorAdapter& operator=(const ArenaAllocatorAdapter&) = default;
   ~ArenaAllocatorAdapter() = default;
 
  private:
@@ -147,8 +147,8 @@ class ArenaAllocatorAdapter : private DebugStackReference, private ArenaAllocato
         ArenaAllocatorAdapterKind(other),
         arena_allocator_(other.arena_allocator_) {
   }
-  ArenaAllocatorAdapter(const ArenaAllocatorAdapter& other) = default;
-  ArenaAllocatorAdapter& operator=(const ArenaAllocatorAdapter& other) = default;
+  ArenaAllocatorAdapter(const ArenaAllocatorAdapter&) = default;
+  ArenaAllocatorAdapter& operator=(const ArenaAllocatorAdapter&) = default;
   ~ArenaAllocatorAdapter() = default;
 
   size_type max_size() const {
index 664a909..df79085 100644 (file)
@@ -85,8 +85,8 @@ class ScopedArenaAllocatorAdapter<void>
         ArenaAllocatorAdapterKind(other),
         arena_stack_(other.arena_stack_) {
   }
-  ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter& other) = default;
-  ScopedArenaAllocatorAdapter& operator=(const ScopedArenaAllocatorAdapter& other) = default;
+  ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter&) = default;
+  ScopedArenaAllocatorAdapter& operator=(const ScopedArenaAllocatorAdapter&) = default;
   ~ScopedArenaAllocatorAdapter() = default;
 
  private:
@@ -128,8 +128,8 @@ class ScopedArenaAllocatorAdapter
         ArenaAllocatorAdapterKind(other),
         arena_stack_(other.arena_stack_) {
   }
-  ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter& other) = default;
-  ScopedArenaAllocatorAdapter& operator=(const ScopedArenaAllocatorAdapter& other) = default;
+  ScopedArenaAllocatorAdapter(const ScopedArenaAllocatorAdapter&) = default;
+  ScopedArenaAllocatorAdapter& operator=(const ScopedArenaAllocatorAdapter&) = default;
   ~ScopedArenaAllocatorAdapter() = default;
 
   size_type max_size() const {
index c9718fc..8655a9e 100644 (file)
@@ -120,8 +120,8 @@ namespace detail {
 
    protected:
     // Avoid the object slicing problem; use Clone() instead.
-    VariantMapKeyRaw(const VariantMapKeyRaw& other) = default;
-    VariantMapKeyRaw(VariantMapKeyRaw&& other) = default;
+    VariantMapKeyRaw(const VariantMapKeyRaw&) = default;
+    VariantMapKeyRaw(VariantMapKeyRaw&&) = default;
 
    private:
     size_t key_counter_;  // Runtime type ID. Unique each time a new type is reified.
@@ -174,8 +174,8 @@ struct VariantMapKey : detail::VariantMapKeyRaw {
     deleter(reinterpret_cast<TValue*>(value));
   }
 
-  VariantMapKey(const VariantMapKey& other) = default;
-  VariantMapKey(VariantMapKey&& other) = default;
+  VariantMapKey(const VariantMapKey&) = default;
+  VariantMapKey(VariantMapKey&&) = default;
 
   template <typename Base, template <typename TV> class TKey> friend struct VariantMap;