mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-17 10:11:42 +02:00
fix warnings
This commit is contained in:
parent
aa32ced692
commit
6a3f59b0e1
2 changed files with 7 additions and 7 deletions
|
@ -167,7 +167,7 @@ void runService(const DNSServiceHandle& service)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int timeout)
|
bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*timeout*/)
|
||||||
{
|
{
|
||||||
result.valid = false;
|
result.valid = false;
|
||||||
// Discover
|
// Discover
|
||||||
|
@ -175,7 +175,7 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int ti
|
||||||
{
|
{
|
||||||
DNSServiceHandle service(new DNSServiceRef(NULL));
|
DNSServiceHandle service(new DNSServiceRef(NULL));
|
||||||
CHECKED(DNSServiceBrowse(service.get(), 0, 0, serviceName.c_str(), "local.",
|
CHECKED(DNSServiceBrowse(service.get(), 0, 0, serviceName.c_str(), "local.",
|
||||||
[](DNSServiceRef service, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode,
|
||||||
const char* serviceName, const char* regtype, const char* replyDomain, void* context) {
|
const char* serviceName, const char* regtype, const char* replyDomain, void* context) {
|
||||||
auto replyCollection = static_cast<deque<mDNSReply>*>(context);
|
auto replyCollection = static_cast<deque<mDNSReply>*>(context);
|
||||||
|
|
||||||
|
@ -194,8 +194,8 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int ti
|
||||||
for (auto& reply : replyCollection)
|
for (auto& reply : replyCollection)
|
||||||
CHECKED(
|
CHECKED(
|
||||||
DNSServiceResolve(service.get(), 0, 0, reply.name.c_str(), reply.regtype.c_str(), reply.domain.c_str(),
|
DNSServiceResolve(service.get(), 0, 0, reply.name.c_str(), reply.regtype.c_str(), reply.domain.c_str(),
|
||||||
[](DNSServiceRef service, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char* fullName,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* /*fullName*/,
|
||||||
const char* hosttarget, uint16_t port, uint16_t txtLen, const unsigned char* txtRecord, void* context) {
|
const char* hosttarget, uint16_t port, uint16_t /*txtLen*/, const unsigned char* /*txtRecord*/, void* context) {
|
||||||
auto resultCollection = static_cast<deque<mDNSResolve>*>(context);
|
auto resultCollection = static_cast<deque<mDNSResolve>*>(context);
|
||||||
|
|
||||||
CHECKED(errorCode);
|
CHECKED(errorCode);
|
||||||
|
@ -215,8 +215,8 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int ti
|
||||||
{
|
{
|
||||||
resultCollection[i].port = resolve.port;
|
resultCollection[i].port = resolve.port;
|
||||||
CHECKED(DNSServiceGetAddrInfo(service.get(), kDNSServiceFlagsLongLivedQuery, 0, kDNSServiceProtocol_IPv4, resolve.fullName.c_str(),
|
CHECKED(DNSServiceGetAddrInfo(service.get(), kDNSServiceFlagsLongLivedQuery, 0, kDNSServiceProtocol_IPv4, resolve.fullName.c_str(),
|
||||||
[](DNSServiceRef service, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t interfaceIndex, DNSServiceErrorType /*errorCode*/,
|
||||||
const char* hostname, const sockaddr* address, uint32_t ttl, void* context) {
|
const char* hostname, const sockaddr* address, uint32_t /*ttl*/, void* context) {
|
||||||
auto result = static_cast<mDNSResult*>(context);
|
auto result = static_cast<mDNSResult*>(context);
|
||||||
|
|
||||||
result->host = string(hostname);
|
result->host = string(hostname);
|
||||||
|
|
|
@ -76,7 +76,7 @@ std::vector<PcmDevice> CoreAudioPlayer::pcm_list(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
UInt32 maxlen = 1024;
|
UInt32 maxlen = 1024;
|
||||||
char buf[maxlen];
|
char buf[1024];
|
||||||
theAddress = {kAudioDevicePropertyDeviceName, kAudioDevicePropertyScopeOutput, 0};
|
theAddress = {kAudioDevicePropertyDeviceName, kAudioDevicePropertyScopeOutput, 0};
|
||||||
AudioObjectGetPropertyData(devids[i], &theAddress, 0, NULL, &maxlen, buf);
|
AudioObjectGetPropertyData(devids[i], &theAddress, 0, NULL, &maxlen, buf);
|
||||||
LOG(DEBUG) << "device: " << i << ", name: " << buf << ", channels: " << channels << "\n";
|
LOG(DEBUG) << "device: " << i << ", name: " << buf << ", channels: " << channels << "\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue