mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									034f9a6ca2
								
							
						
					
					
						commit
						a312e53f0c
					
				
					 7 changed files with 13 additions and 33 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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()));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								core/ios.cpp
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue