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
Unknown Object (File)
Sun, Oct 12, 10:08 PM
Unknown Object (File)
Sep 22 2025, 12:53 AM
Unknown Object (File)
Sep 20 2025, 7:28 AM
Unknown Object (File)
Sep 15 2025, 4:47 PM
Unknown Object (File)
Sep 11 2025, 7:08 PM
Unknown Object (File)
Aug 18 2025, 5:20 PM
Unknown Object (File)
Jul 28 2025, 8:07 PM
Unknown Object (File)
Jun 26 2025, 10:53 AM
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
Lint Skipped
Unit
Tests Skipped

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).