Skip to content

Commit

Permalink
test/stream: fix -Woverloaded-virtual warning
Browse files Browse the repository at this point in the history
Explicilty override `uvw::uv_type<U>::init()` in `fake_stream_handle`
to hide the following compiler warning:

```
src/uvw/uv_type.hpp:32:17: warning: ‘int uvw::uv_type<U>::init() [with U = fake_stream_t]’ was hidden [-Woverloaded-virtual]
   32 |     virtual int init() {
      |                 ^~~~
test/uvw/stream.cpp:12:9: note:   by ‘fake_stream_handle::init(Args&& ...)’
   12 |     int init(Args &&...) override {
                ^~~~
```
  • Loading branch information
aloisklink committed Aug 23, 2023
1 parent b820447 commit 628b603
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/uvw/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ struct fake_stream_handle: uvw::stream_handle<fake_stream_handle, fake_stream_t>
int init(Args &&...) {
return 0;
}

virtual int init() override {
return 0;
}
};

0 comments on commit 628b603

Please sign in to comment.