Skip to content

Commit

Permalink
QtDBus: Remove uses of Q_UNUSED on used variables
Browse files Browse the repository at this point in the history
This also includes variables only used in Q_ASSERT, those
don't generate warnings anymore even when asserts are disabled.

Change-Id: Ia557120d442c100c9437b106a01a4079d48640af
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
eugmes committed Sep 10, 2023
1 parent dad4212 commit fa78a9f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/dbus/qdbusabstractinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,
const QString &newOwner)
{
Q_UNUSED(oldOwner);
Q_UNUSED(name);
//qDebug() << "QDBusAbstractInterfacePrivate serviceOwnerChanged" << name << oldOwner << newOwner;
Q_ASSERT(name == service);
currentOwner = newOwner;
Expand Down
5 changes: 0 additions & 5 deletions src/dbus/qdbusintegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ static void qDBusToggleWatch(DBusWatch *watch, void *data)
static void qDBusUpdateDispatchStatus(DBusConnection *connection, DBusDispatchStatus new_status, void *data)
{
Q_ASSERT(connection);
Q_UNUSED(connection);
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
if (new_status == DBUS_DISPATCH_DATA_REMAINS)
emit d->dispatchStatusChanged();
Expand All @@ -287,7 +286,6 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
{
// ### We may want to separate the server from the QDBusConnectionPrivate
Q_ASSERT(server);
Q_UNUSED(server);
Q_ASSERT(connection);
Q_ASSERT(data);

Expand Down Expand Up @@ -774,7 +772,6 @@ QDBusCallDeliveryEvent *QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv
const QDBusMessage &msg)
{
Q_ASSERT(object);
Q_UNUSED(object);

int n = metaTypes.size() - 1;
if (metaTypes[n] == QDBusMetaTypeId::message())
Expand Down Expand Up @@ -1279,7 +1276,6 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in
void QDBusConnectionPrivate::serviceOwnerChangedNoLock(const QString &name,
const QString &oldOwner, const QString &newOwner)
{
Q_UNUSED(oldOwner);
// QDBusWriteLocker locker(UpdateSignalHookOwnerAction, this);
WatchedServicesHash::Iterator it = watchedServices.find(name);
if (it == watchedServices.end())
Expand Down Expand Up @@ -1848,7 +1844,6 @@ static void qDBusResultReceived(DBusPendingCall *pending, void *user_data)
{
QDBusPendingCallPrivate *call = reinterpret_cast<QDBusPendingCallPrivate *>(user_data);
Q_ASSERT(call->pending == pending);
Q_UNUSED(pending);
QDBusConnectionPrivate::processFinishedCall(call);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/dbus/qdbuspendingcall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ QDBusPendingCall::QDBusPendingCall(QDBusPendingCallPrivate *dd)
if (dd) {
bool r = dd->ref.deref();
Q_ASSERT(r);
Q_UNUSED(r);
}
}

Expand Down

0 comments on commit fa78a9f

Please sign in to comment.