HomePhabricator

fix undefined behaviour in seeder (select() aliasing)

Description

fix undefined behaviour in seeder (select() aliasing)

Summary:
I don't see the restrict-ness documented in man pages, but the previous
usage of select() here was triggering an aliasing warning.

../../src/seeder/bitcoin.cpp:294:36: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
         int ret = select(sock + 1, &set, nullptr, &set, &wa);
                                    ^~~~           ~~~~

Test Plan: make check

Reviewers: Fabien, jasonbcox, #bitcoin_abc, deadalnix, nakihito

Reviewed By: #bitcoin_abc, deadalnix, nakihito

Differential Revision: https://reviews.bitcoinabc.org/D4618

Details

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Dec 2 2019, 19:33
markblundebergPushed on Dec 3 2019, 01:16
Reviewer
Restricted Project
Differential Revision
D4618: fix undefined behaviour in seeder (select() aliasing)
Parents
rABC254497ff6835: Update the github issue template to include disclosure policy
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABC22a1d33378fb: fix undefined behaviour in seeder (select() aliasing) (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Dec 3 2019, 01:16