]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[libcasper] Update cap_dns API to not trigger unused variable warnings when disabled
authoradrian <adrian@FreeBSD.org>
Tue, 13 Oct 2020 22:49:43 +0000 (22:49 +0000)
committeradrian <adrian@FreeBSD.org>
Tue, 13 Oct 2020 22:49:43 +0000 (22:49 +0000)
commitab8cd66366b1c3bac9c7abf22c34d72e0f21fc20
treeaea48dccef9b1540d42002bf73d02d99abf1e615
parentcf30367a611565a8fd70ff7ce1834f6d47cfdca4
[libcasper] Update cap_dns API to not trigger unused variable warnings when disabled

When compiling without casper these API calls result in unused variable warnings.
Using #defines was lovely in the past but unfortunately it triggers warnings
which can cascade into errors.

Instead, just inline with some fallthrough functions and keep things happy.

Tested:

* gcc-6 targeting mips32, with casper disabled

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D26762
lib/libcasper/services/cap_dns/cap_dns.h