Page MenuHomeFreeBSD

Fix clang 3.5.0 warning in libngatm
ClosedPublic

Authored by dim on Nov 18 2014, 6:37 PM.
Tags
None
Referenced Files
F105988478: D1188.diff
Mon, Dec 23, 1:07 PM
Unknown Object (File)
Wed, Dec 18, 2:21 AM
Unknown Object (File)
Mon, Nov 25, 12:26 PM
Unknown Object (File)
Sat, Nov 23, 2:39 PM
Unknown Object (File)
Oct 5 2024, 6:34 AM
Unknown Object (File)
Oct 2 2024, 10:48 AM
Unknown Object (File)
Oct 2 2024, 10:14 AM
Unknown Object (File)
Sep 30 2024, 5:03 PM
Subscribers
None

Details

Summary

Fix the following -Werror warning from clang 3.5.0, while building lib/libngatm:

sys/contrib/ngatm/netnatm/saal/saal_sscop.c:4030:32: error: 'break' is bound to current loop, GCC binds it to the enclosing loop [-Werror,-Wgcc-compat]
                } while(sn < sscop->vr_h && !QFIND(&sscop->rbuf, sn));
                                             ^
sys/contrib/ngatm/netnatm/saal/saal_sscop.c:173:4: note: expanded from macro 'QFIND'
                        break;                                          \
                        ^
1 error generated.

The idea is to remove any ambiguity by replacing the macro with an equivalent static inline function.

Test Plan

Compile it, testing it in practice will be hard, as ngatm is mostly dead.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dim retitled this revision from to Fix clang 3.5.0 warning in libngatm.
dim updated this object.
dim edited the test plan for this revision. (Show Details)
dim added reviewers: emaste, rpaulo.
rpaulo edited edge metadata.
This revision is now accepted and ready to land.Nov 18 2014, 7:20 PM
dim updated this revision to Diff 2455.

Closed by commit rS274698 (authored by @dim).