2020-10-11 Fred Gleason <fredg@paravelsystems.com>

* Fixed gcc(1) format-string warnings in 'lib/rdmulticaster.cpp'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-10-11 13:44:20 -04:00
parent ab0a561c12
commit d2075b2502
2 changed files with 11 additions and 4 deletions

View File

@ -20456,3 +20456,6 @@
* Fixed a bug in rdairplay(1) where copying a log event using
the 'Copy' button would result in the new event always getting
a 'PLAY' transition.
2020-10-11 Fred Gleason <fredg@paravelsystems.com>
2020-10-11 Fred Gleason <fredg@paravelsystems.com>
* Fixed gcc(1) format-string warnings in 'lib/rdmulticaster.cpp'.

View File

@ -65,8 +65,10 @@ void RDMulticaster::subscribe(const QHostAddress &addr)
mreq.imr_ifindex=0;
if(setsockopt(multi_socket->socket(),IPPROTO_IP,IP_ADD_MEMBERSHIP,
&mreq,sizeof(mreq))<0) {
fprintf(stderr,tr("Unable to subscribe to multicast address")+" \""+
addr.toString()+"\" ["+QString(strerror(errno))+"]");
fprintf(stderr,"%s\n",(tr("Unable to subscribe to multicast address")+
" \""+addr.toString()+"\" ["+
QString(strerror(errno))+"]").
toUtf8().constData());
}
}
}
@ -83,8 +85,10 @@ void RDMulticaster::unsubscribe(const QHostAddress &addr)
mreq.imr_ifindex=0;
if(setsockopt(multi_socket->socket(),IPPROTO_IP,IP_DROP_MEMBERSHIP,
&mreq,sizeof(mreq))<0) {
fprintf(stderr,tr("Unable to subscribe to multicast address")+" \""+
addr.toString()+"\" ["+QString(strerror(errno))+"]");
fprintf(stderr,"%s\n",(tr("Unable to subscribe to multicast address")+
" \""+addr.toString()+"\" ["+
QString(strerror(errno))+"]").
toUtf8().constData());
}
}
}