Skip to content

Commit 341f98d

Browse files
cngzhnpakeles85
andauthored
Fix unused parameter warnings for all components (#1138)
* Fix unused parameter warnings for all components * Reverting back some changes after first review comments --------- Co-authored-by: Ali Keles <[email protected]>
1 parent 406490f commit 341f98d

31 files changed

+134
-127
lines changed

hazelcast/include/hazelcast/client/impl/EntryEventHandler.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ class EntryEventHandler : public BaseType
8585

8686
private:
8787
void fire_map_wide_event(
88-
const boost::optional<serialization::pimpl::data>& key,
89-
const boost::optional<serialization::pimpl::data>& value,
90-
const boost::optional<serialization::pimpl::data>& old_value,
91-
const boost::optional<serialization::pimpl::data>& merging_value,
88+
const boost::optional<serialization::pimpl::data>& /* key */,
89+
const boost::optional<serialization::pimpl::data>& /* value */,
90+
const boost::optional<serialization::pimpl::data>& /* old_value */,
91+
const boost::optional<serialization::pimpl::data>& /* merging_value */,
9292
int32_t event_type,
9393
boost::uuids::uuid uuid,
9494
int32_t number_of_affected_entries)
@@ -114,7 +114,7 @@ class EntryEventHandler : public BaseType
114114
const boost::optional<serialization::pimpl::data>& merging_value,
115115
int32_t event_type,
116116
boost::uuids::uuid uuid,
117-
int32_t number_of_affected_entries)
117+
int32_t /* number_of_affected_entries */)
118118
{
119119
typed_data eventKey, val, oldVal, mergingVal;
120120
if (include_value_) {

hazelcast/include/hazelcast/client/internal/eviction/EvictableStore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class EvictableStore
6464
*/
6565
virtual int evict(
6666
std::vector<std::shared_ptr<EvictionCandidate<MAPKEY, MAPVALUE, A, E>>>*
67-
eviction_candidates,
68-
EvictionListener<A, E>* eviction_listener)
67+
/* eviction_candidates */,
68+
EvictionListener<A, E>* /* eviction_listener */)
6969
{
7070
assert(0);
7171
return 0;

hazelcast/include/hazelcast/client/internal/eviction/EvictionListener.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ class EvictionListener
5454
* @param wasExpired {@code true} if the entry was evicted due to
5555
* expiration, {@code false} otherwise
5656
*/
57-
virtual void on_evict(const std::shared_ptr<A>& evicted_entry_accessor,
58-
const std::shared_ptr<E>& evicted_entry,
59-
bool was_expired)
57+
virtual void on_evict(const std::shared_ptr<A>& /* evicted_entry_accessor */,
58+
const std::shared_ptr<E>& /* evicted_entry */,
59+
bool /* was_expired */)
6060
{
6161
assert(0);
6262
}

hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyComparator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class EvictionPolicyComparator : util::Comparator<EvictableEntryView<K, V>>
7070
*
7171
* @return the result of comparison
7272
*/
73-
int compare(const EvictableEntryView<K, V>* e1,
74-
const EvictableEntryView<K, V>* e2) const override
73+
int compare(const EvictableEntryView<K, V>* /* e1 */,
74+
const EvictableEntryView<K, V>* /* e2 */) const override
7575
{
7676
assert(0);
7777
return 0;

hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyEvaluator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class EvictionPolicyEvaluator
7878
virtual std::unique_ptr<std::vector<
7979
std::shared_ptr<eviction::EvictionCandidate<MAPKEY, MAPVALUE, A, E>>>>
8080
evaluate(util::Iterable<EvictionCandidate<MAPKEY, MAPVALUE, A, E>>&
81-
eviction_candidates) const
81+
/* eviction_candidates */) const
8282
{
8383
assert(0);
8484
return std::unique_ptr<std::vector<std::shared_ptr<

hazelcast/include/hazelcast/client/internal/eviction/EvictionStrategy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ class EvictionStrategy
7070
*
7171
* @return evicted entry count
7272
*/
73-
virtual int evict(S* evictable_store,
73+
virtual int evict(S* /* evictable_store*/,
7474
EvictionPolicyEvaluator<MAPKEY, MAPVALUE, A, E>*
75-
eviction_policy_evaluator,
76-
EvictionChecker* eviction_checker,
77-
EvictionListener<A, E>* eviction_listener)
75+
/* eviction_policy_evaluator*/,
76+
EvictionChecker* /* eviction_checker*/,
77+
EvictionListener<A, E>* /* eviction_listener */)
7878
{
7979
assert(0);
8080
return 0;

hazelcast/include/hazelcast/client/internal/eviction/impl/comparator/RandomEvictionPolicyComparator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ template<typename A, typename E>
3838
class RandomEvictionPolicyComparator : public EvictionPolicyComparator<A, E>
3939
{
4040
public:
41-
int compare(const EvictableEntryView<A, E>* e1,
42-
const EvictableEntryView<A, E>* e2) const override
41+
int compare(const EvictableEntryView<A, E>* /* e1 */,
42+
const EvictableEntryView<A, E>* /* e2 */) const override
4343
{
4444
return 0;
4545
}

hazelcast/include/hazelcast/client/internal/eviction/impl/strategy/AbstractEvictionStrategy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ class AbstractEvictionStrategy
9797
* @return evicted entry count
9898
*/
9999
protected:
100-
virtual int evict_internal(S* evictable_store,
100+
virtual int evict_internal(S* /* evictable_store */,
101101
EvictionPolicyEvaluator<MAPKEY, MAPVALUE, A, E>*
102-
eviction_policy_evaluator,
103-
EvictionListener<A, E>* eviction_listener)
102+
/* eviction_policy_evaluator */,
103+
EvictionListener<A, E>* /* eviction_listener */)
104104
{
105105
assert(0);
106106
return 0;

hazelcast/include/hazelcast/client/internal/nearcache/NearCache.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class NearCache : public BaseNearCache
114114
* @param key the key of the requested value
115115
* @return the value associated with the given <code>key</code>
116116
*/
117-
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& key)
117+
virtual std::shared_ptr<V> get(const std::shared_ptr<K>& /* key */)
118118
{
119119
assert(0);
120120
return std::shared_ptr<V>();
@@ -126,8 +126,8 @@ class NearCache : public BaseNearCache
126126
* @param key the key of the value will be stored
127127
* @param value the value will be stored
128128
*/
129-
virtual void put(const std::shared_ptr<K>& key,
130-
const std::shared_ptr<V>& value)
129+
virtual void put(const std::shared_ptr<K>& /* key */,
130+
const std::shared_ptr<V>& /* value */)
131131
{
132132
assert(0);
133133
}
@@ -151,7 +151,7 @@ class NearCache : public BaseNearCache
151151
*
152152
* @param key the key of the value will be invalidated
153153
*/
154-
virtual bool invalidate(const std::shared_ptr<K>& key)
154+
virtual bool invalidate(const std::shared_ptr<K>& /* key */)
155155
{
156156
assert(0);
157157
return false;

hazelcast/include/hazelcast/client/internal/nearcache/NearCacheRecord.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,29 @@ class NearCacheRecord
5959
*
6060
* @param value the value for this {@link NearCacheRecord}
6161
*/
62-
virtual void set_value(const std::shared_ptr<V>& value) { assert(0); }
62+
virtual void set_value(const std::shared_ptr<V>& /* value */) { assert(0); }
6363

6464
/**
6565
* Sets the creation time of this {@link Evictable} in milliseconds.
6666
*
6767
* @param time the creation time for this {@link Evictable} in milliseconds
6868
*/
69-
virtual void set_creation_time(int64_t time) = 0;
69+
virtual void set_creation_time(int64_t /* time */) = 0;
7070

7171
/**
7272
* Sets the access time of this {@link Evictable} in milliseconds.
7373
*
7474
* @param time the latest access time of this {@link Evictable} in
7575
* milliseconds
7676
*/
77-
virtual void set_access_time(int64_t time) = 0;
77+
virtual void set_access_time(int64_t /* time */) = 0;
7878

7979
/**
8080
* Sets the access hit count of this {@link Evictable}.
8181
*
8282
* @param hit the access hit count for this {@link Evictable}
8383
*/
84-
virtual void set_access_hit(int32_t hit) = 0;
84+
virtual void set_access_hit(int32_t /* hit */) = 0;
8585

8686
/**
8787
* Increases the access hit count of this {@link Evictable} by {@code 1}.
@@ -102,7 +102,7 @@ class NearCacheRecord
102102
* @param now current time in milliseconds
103103
* @return {@code true} if exceeds max idle seconds, otherwise {@code false}
104104
*/
105-
virtual bool is_idle_at(int64_t max_idle_milli_seconds, int64_t now) = 0;
105+
virtual bool is_idle_at(int64_t /* max_idle_milli_seconds */, int64_t /* now */) = 0;
106106

107107
/**
108108
* @return last known invalidation sequence at time of this records'
@@ -114,19 +114,19 @@ class NearCacheRecord
114114
* @param sequence last known invalidation sequence at time of this records'
115115
* creation
116116
*/
117-
virtual void set_invalidation_sequence(int64_t sequence) = 0;
117+
virtual void set_invalidation_sequence(int64_t /* sequence */) = 0;
118118

119119
/**
120120
* @param uuid last known uuid of invalidation source at time of this
121121
* records' creation
122122
*/
123-
virtual void set_uuid(boost::uuids::uuid uuid) = 0;
123+
virtual void set_uuid(boost::uuids::uuid /* uuid */) = 0;
124124

125125
/**
126126
* @return {@code true} if supplied uuid equals existing one, otherwise and
127127
* when one of supplied or existing is null returns {@code false}
128128
*/
129-
virtual bool has_same_uuid(boost::uuids::uuid that_uuid) const = 0;
129+
virtual bool has_same_uuid(boost::uuids::uuid /* that_uuid */) const = 0;
130130
};
131131
} // namespace nearcache
132132
} // namespace internal

0 commit comments

Comments
 (0)