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)
Sat, Jun 22, 12:13 AM
Unknown Object (File)
Thu, May 30, 2:15 PM
Unknown Object (File)
May 5 2024, 3:17 PM
Unknown Object (File)
Feb 24 2024, 7:00 AM
Unknown Object (File)
Feb 24 2024, 7:00 AM
Unknown Object (File)
Feb 24 2024, 7:00 AM
Unknown Object (File)
Feb 24 2024, 6:44 AM
Unknown Object (File)
Jan 18 2024, 3:48 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
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).