Skip to content

Commit

Permalink
Merge pull request #569 from beef9999/fix-compile-shadow-warning
Browse files Browse the repository at this point in the history
Fix the -Wshadow warning in compile
  • Loading branch information
lihuiba authored Sep 25, 2024
2 parents 1ea40bc + c733eb6 commit 0ed102e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions common/alog.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ struct __LogAppender : public Builder {
using Builder::logger;
using Builder::done;
Append append;
explicit __LogAppender(Builder&& rhs, Append&& append)
: Builder(std::move(rhs)), append(std::move(append)) {}
explicit __LogAppender(Builder&& rhs, Append&& append_)
: Builder(std::move(rhs)), append(std::move(append_)) {}
__LogAppender(__LogAppender&& rhs)
: Builder(std::move(rhs)), append(std::move(rhs.append)) {}
~__LogAppender() {
Expand Down
24 changes: 12 additions & 12 deletions common/iovector.h
Original file line number Diff line number Diff line change
Expand Up @@ -1008,24 +1008,24 @@ class IOVectorEntity : public iovector
}
};

inline size_t iovector_view::memcpy_to(iovector_view* iov, size_t size) const {
IOVectorEntity<32, 0> co_iov(this->iov, iovcnt);
return co_iov.view().memcpy_to(iov, size);
inline size_t iovector_view::memcpy_to(iovector_view* iov_, size_t size) const {
IOVectorEntity<32, 0> co_iov(iov, iovcnt);
return co_iov.view().memcpy_to(iov_, size);
}

inline size_t iovector_view::memcpy_from(iovector_view* iov, size_t size) const {
IOVectorEntity<32, 0> co_iov(this->iov, iovcnt);
return co_iov.view().memcpy_from(iov, size);
inline size_t iovector_view::memcpy_from(iovector_view* iov_, size_t size) const {
IOVectorEntity<32, 0> co_iov(iov, iovcnt);
return co_iov.view().memcpy_from(iov_, size);
}

inline size_t iovector_view::memcpy_to(const iovector_view* iov, size_t size) const {
IOVectorEntity<32, 0> co_iov(this->iov, iovcnt);
return co_iov.view().memcpy_from(iov, size);
inline size_t iovector_view::memcpy_to(const iovector_view* iov_, size_t size) const {
IOVectorEntity<32, 0> co_iov(iov, iovcnt);
return co_iov.view().memcpy_from(iov_, size);
}

inline size_t iovector_view::memcpy_from(const iovector_view* iov, size_t size) const {
IOVectorEntity<32, 0> co_iov(this->iov, iovcnt);
return co_iov.view().memcpy_from(iov, size);
inline size_t iovector_view::memcpy_from(const iovector_view* iov_, size_t size) const {
IOVectorEntity<32, 0> co_iov(iov, iovcnt);
return co_iov.view().memcpy_from(iov_, size);
}


Expand Down
2 changes: 1 addition & 1 deletion common/retval.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct retval : public retval_base {

template<>
struct retval<void> : public retval_base {
retval(int _errno = 0) : retval_base{(uint64_t)_errno} { }
retval(int errno_ = 0) : retval_base{(uint64_t)errno_} { }
retval(const retval_base& rvb) : retval_base(rvb) { }
void get() const { }
retval_base base() const {
Expand Down
3 changes: 1 addition & 2 deletions photon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ int __photon_init(uint64_t event_engine, uint64_t io_engine, const PhotonOptions
const uint64_t ALL_ENGINES =
INIT_EVENT_EPOLL | INIT_EVENT_EPOLL_NG |
INIT_EVENT_IOURING | INIT_EVENT_KQUEUE |
INIT_EVENT_SELECT | INIT_EVENT_IOCP |
INIT_EVENT_EPOLL_NG;
INIT_EVENT_SELECT | INIT_EVENT_IOCP;
if (event_engine & ALL_ENGINES) {
bool ok = false;
for (auto x : recommended_order) {
Expand Down

0 comments on commit 0ed102e

Please sign in to comment.