Page MenuHomePhabricator

fix undefined behaviour in seeder (select() aliasing)
ClosedPublic

Authored by markblundeberg on Dec 2 2019, 19:43.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix-seeder-select
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8378
Build 14774: Default Diff Build & Tests
Build 14773: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Dec 2 2019, 23:32