Repository navigation
fix: silence some compiler warnings - #7318
Conversation
We use squash merges and usually take the description from the pull request, not the individual commit(s). |
pajlada
left a comment
There was a problem hiding this comment.
Hi! Thanks for your contribution.
I'd prefer if this uses std::ignore. If there's a reason we should use [[maybe_unused]] instead, please enlighten me 🙏
There's no particular reason, I've used it often lately, that's why I used it here. |
Yes please - thank you! |
> [...]/chatterino-9999/src/util/UnixSignalHandler.cpp: > In static member function ‘static void > chatterino::UnixSignalHandler::fired(int)’: > [...]/chatterino-9999/src/util/UnixSignalHandler.cpp:71:12: > warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ > declared with attribute ‘warn_unused_result’ [-Wunused-result] > 71 | ::write(cls->fd[0], &a, sizeof(a)); > | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ > [...]/chatterino-9999/src/util/UnixSignalHandler.cpp: > In member function ‘void > chatterino::UnixSignalHandler::handleSignal()’: > [...]/chatterino-9999/src/util/UnixSignalHandler.cpp:79:11: > warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’ > declared with attribute ‘warn_unused_result’ [-Wunused-result] > 79 | ::read(this->fd[1], &tmp, sizeof(tmp)); > | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Fabrice Delliaux <netbox253@gmail.com>
000a728 to
4b59337
Compare
|
Thank you! As a first-time contributor, you are now eligible to be listed in the About page in Chatterino. If you want this, you can open a new PR where you modify the |
This silence two compiler warnings (described in commit message).