summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-21 17:36:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-21 12:48:04 -0700
commita312e53f0ce47dd2797070dff37e51fbfafd489a (patch)
treebb603a4ffafc2dea632a587e6cc5b7cdb91f73ca /core
parent034f9a6ca2eabcc4714214ca07207509b00e39a2 (diff)
downloadsubsurface-a312e53f0ce47dd2797070dff37e51fbfafd489a.tar.gz
core: Change Q_UNUSED to no parameter name
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core')
-rw-r--r--core/btdiscovery.cpp3
-rw-r--r--core/configuredivecomputerthreads.cpp4
-rw-r--r--core/connectionlistmodel.cpp3
-rw-r--r--core/gpslocation.cpp6
-rw-r--r--core/ios.cpp13
-rw-r--r--core/qt-ble.cpp13
-rw-r--r--core/qtserialbluetooth.cpp4
7 files changed, 13 insertions, 33 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index ba4d7b1ce..a96deb6fd 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -64,10 +64,9 @@ static dc_descriptor_t *getDeviceType(QString btName)
return NULL;
}
-BTDiscovery::BTDiscovery(QObject *parent) : m_btValid(false),
+BTDiscovery::BTDiscovery(QObject*) : m_btValid(false),
discoveryAgent(NULL)
{
- Q_UNUSED(parent)
if (m_instance) {
qDebug() << "trying to create an additional BTDiscovery object";
return;
diff --git a/core/configuredivecomputerthreads.cpp b/core/configuredivecomputerthreads.cpp
index 51a61048e..819aba3bd 100644
--- a/core/configuredivecomputerthreads.cpp
+++ b/core/configuredivecomputerthreads.cpp
@@ -2097,10 +2097,8 @@ void DeviceThread::progressCB(int percent)
emit progress(percent);
}
-void DeviceThread::event_cb(dc_device_t *device, dc_event_type_t event, const void *data, void *userdata)
+void DeviceThread::event_cb(dc_device_t *, dc_event_type_t event, const void *data, void *userdata)
{
- Q_UNUSED(device);
-
const dc_event_progress_t *progress = (dc_event_progress_t *) data;
DeviceThread *dt = static_cast<DeviceThread*>(userdata);
diff --git a/core/connectionlistmodel.cpp b/core/connectionlistmodel.cpp
index 812c6508d..04d1d5909 100644
--- a/core/connectionlistmodel.cpp
+++ b/core/connectionlistmodel.cpp
@@ -30,9 +30,8 @@ QString ConnectionListModel::address(int idx) const
return m_addresses[idx];
}
-int ConnectionListModel::rowCount(const QModelIndex &parent) const
+int ConnectionListModel::rowCount(const QModelIndex&) const
{
- Q_UNUSED(parent)
return m_addresses.count();
}
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index 2fcb9f1b0..7b68c68f0 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -466,15 +466,13 @@ void GpsLocation::clearGpsData()
}
#endif
-void GpsLocation::postError(QNetworkReply::NetworkError error)
+void GpsLocation::postError(QNetworkReply::NetworkError)
{
- Q_UNUSED(error);
status(QString("error when sending a GPS fix: %1").arg(reply->errorString()));
}
-void GpsLocation::getUseridError(QNetworkReply::NetworkError error)
+void GpsLocation::getUseridError(QNetworkReply::NetworkError)
{
- Q_UNUSED(error);
status(QString("error when retrieving Subsurface webservice user id: %1").arg(reply->errorString()));
}
diff --git a/core/ios.cpp b/core/ios.cpp
index 1958183fa..b951f4901 100644
--- a/core/ios.cpp
+++ b/core/ios.cpp
@@ -29,17 +29,15 @@ void subsurface_OS_pref_setup(void)
// nothing
}
-bool subsurface_ignore_font(const char *font)
+bool subsurface_ignore_font(const char*)
{
// there are no old default fonts that we would want to ignore
- Q_UNUSED(font);
return false;
}
-void subsurface_user_info(struct user_info *user)
+void subsurface_user_info(struct user_info *)
{
- // We use of at least libgit2-0.20
- Q_UNUSED(user);
+ // We use of at least libgit2-0.20
}
static const char *system_default_path_append(const char *append)
@@ -70,12 +68,9 @@ const char *system_default_filename(void)
return path;
}
-int enumerate_devices(device_callback_t callback, void *userdata, int dc_type)
+int enumerate_devices(device_callback_t, void *, int)
{
// we can't read from devices on iOS
- Q_UNUSED(callback)
- Q_UNUSED(userdata)
- Q_UNUSED(dc_type)
return -1;
}
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp
index 8c40b9b19..3deec8e65 100644
--- a/core/qt-ble.cpp
+++ b/core/qt-ble.cpp
@@ -47,10 +47,8 @@ static void waitFor(int ms) {
extern "C" {
-void BLEObject::serviceStateChanged(QLowEnergyService::ServiceState s)
+void BLEObject::serviceStateChanged(QLowEnergyService::ServiceState)
{
- Q_UNUSED(s)
-
QList<QLowEnergyCharacteristic> list;
auto service = qobject_cast<QLowEnergyService*>(sender());
@@ -92,10 +90,8 @@ void BLEObject::characteristicWritten(const QLowEnergyCharacteristic &c, const Q
}
}
-void BLEObject::writeCompleted(const QLowEnergyDescriptor &d, const QByteArray &value)
+void BLEObject::writeCompleted(const QLowEnergyDescriptor&, const QByteArray&)
{
- Q_UNUSED(value)
- Q_UNUSED(d)
qDebug() << "BLE write completed";
}
@@ -149,8 +145,6 @@ BLEObject::~BLEObject()
dc_status_t BLEObject::write(const void *data, size_t size, size_t *actual)
{
- Q_UNUSED(actual) // that seems like it might cause problems
-
if (actual) *actual = 0;
if (!receivedPackets.isEmpty()) {
@@ -274,9 +268,8 @@ dc_status_t BLEObject::setupHwTerminalIo(QList<QLowEnergyCharacteristic> allC)
return setHwCredit(MAXIMAL_HW_CREDIT);
}
-dc_status_t qt_ble_open(void **io, dc_context_t *context, const char *devaddr, dc_user_device_t *user_device)
+dc_status_t qt_ble_open(void **io, dc_context_t *, const char *devaddr, dc_user_device_t *user_device)
{
- Q_UNUSED(context)
debugCounter = 0;
QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
diff --git a/core/qtserialbluetooth.cpp b/core/qtserialbluetooth.cpp
index 8bc5e5803..962602b42 100644
--- a/core/qtserialbluetooth.cpp
+++ b/core/qtserialbluetooth.cpp
@@ -41,10 +41,8 @@ typedef struct qt_serial_t {
long timeout;
} qt_serial_t;
-static dc_status_t qt_serial_open(qt_serial_t **io, dc_context_t *context, const char* devaddr)
+static dc_status_t qt_serial_open(qt_serial_t **io, dc_context_t*, const char* devaddr)
{
- Q_UNUSED(context);
-
// Allocate memory.
qt_serial_t *serial_port = (qt_serial_t *) malloc (sizeof (qt_serial_t));
if (serial_port == NULL) {