Skip to content

Commit

Permalink
Fix remaining warnings in murmur code
Browse files Browse the repository at this point in the history
Fixes remaining unused function, shadow and cast warnings
in murmur code.
  • Loading branch information
hacst committed Oct 26, 2015
1 parent 7b882d0 commit 68205b9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 2 additions & 0 deletions src/murmur/Cert.cpp
Expand Up @@ -49,6 +49,7 @@ static int add_ext(X509 * crt, int nid, char *value) {
return 1;
}

#if defined(USE_QSSLDIFFIEHELLMANPARAMETERS)
// dh_progress is a status callback for DH_generate_parameterss_ex.
// We use it to run the event loop while generating DH params, in
// order to keep the Murmur GUI on Windows responsive during the
Expand All @@ -57,6 +58,7 @@ static int dh_progress(int, int, BN_GENCB *) {
qApp->processEvents();
return 1;
}
#endif

bool Server::isKeyForCert(const QSslKey &key, const QSslCertificate &cert) {
if (key.isNull() || cert.isNull() || (key.type() != QSsl::PrivateKey))
Expand Down
27 changes: 14 additions & 13 deletions src/murmur/Messages.cpp
Expand Up @@ -1471,29 +1471,30 @@ void Server::msgUserList(ServerUser *uSource, MumbleProto::UserList &msg) {
for (; it != users.constEnd(); ++it) {
// Skip the SuperUser
if (it->user_id > 0) {
::MumbleProto::UserList_User *u = msg.add_users();
u->set_user_id(it->user_id);
u->set_name(u8(it->name));
::MumbleProto::UserList_User *user = msg.add_users();
user->set_user_id(it->user_id);
user->set_name(u8(it->name));
if (it->last_channel) {
u->set_last_channel(*it->last_channel);
user->set_last_channel(*it->last_channel);
}
u->set_last_seen(u8(it->last_active.toString(Qt::ISODate)));
user->set_last_seen(u8(it->last_active.toString(Qt::ISODate)));
}
}
sendMessage(uSource, msg);
} else {
// Update mode
for (int i=0; i < msg.users_size(); ++i) {
const MumbleProto::UserList_User &u = msg.users(i);
const MumbleProto::UserList_User &user = msg.users(i);

int id = u.user_id();
int id = user.user_id();
if (id == 0)
continue;

if (! u.has_name()) {
if (! user.has_name()) {
log(uSource, QString::fromLatin1("Unregistered user %1").arg(id));
unregisterUser(id);
} else {
const QString &name = u8(u.name());
const QString &name = u8(user.name());
if (validateUserName(name)) {
log(uSource, QString::fromLatin1("Renamed user %1 to '%2'").arg(QString::number(id), name));

Expand All @@ -1502,10 +1503,10 @@ void Server::msgUserList(ServerUser *uSource, MumbleProto::UserList &msg) {
setInfo(id, info);

MumbleProto::UserState mpus;
foreach(ServerUser *u, qhUsers) {
if (u->iId == id) {
u->qsName = name;
mpus.set_session(u->uiSession);
foreach(ServerUser *serverUser, qhUsers) {
if (serverUser->iId == id) {
serverUser->qsName = name;
mpus.set_session(serverUser->uiSession);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/ServerUser.h
Expand Up @@ -93,7 +93,7 @@ class ServerUser : public Connection, public User {

float dUDPPingAvg, dUDPPingVar;
float dTCPPingAvg, dTCPPingVar;
quint64 uiUDPPackets, uiTCPPackets;
quint32 uiUDPPackets, uiTCPPackets;

unsigned int uiVersion;
QString qsRelease;
Expand Down

0 comments on commit 68205b9

Please sign in to comment.