updated more incorrect logging types (%s vs %d) (#156)

This commit is contained in:
penfold42 2016-08-07 15:06:56 +10:00 committed by redPanther
parent bb3b658b5c
commit 84c041a6fb
4 changed files with 14 additions and 14 deletions

View File

@ -128,7 +128,7 @@ bool EffectEngine::loadEffectDefinition(const std::string &path, const std::stri
{
const std::list<std::string> & errors = schemaChecker.getMessages();
foreach (const std::string & error, errors) {
Error( log, "Error while checking '%s':", fileName.c_str(), error.c_str());
Error( log, "Error while checking '%s':%s", fileName.c_str(), error.c_str());
}
return false;
}

View File

@ -259,7 +259,7 @@ int LedDeviceLightpackHidapi::writeBytes(uint8_t *data, int size)
return 0;
}
Error(_log, "Unable to write %s bytes to Lightpack device(%s)", size, error);
Error(_log, "Unable to write %d bytes to Lightpack device(%d)", size, error);
return error;
}

View File

@ -71,7 +71,7 @@ int LedDeviceLightpack::open()
// initialize the usb context
if ((error = libusb_init(&_libusbContext)) != LIBUSB_SUCCESS)
{
Error(_log, "Error while initializing USB context(%s): %s", error, libusb_error_name(error));
Error(_log, "Error while initializing USB context(%d): %s", error, libusb_error_name(error));
_libusbContext = nullptr;
return -1;
}
@ -119,7 +119,7 @@ int LedDeviceLightpack::testAndOpen(libusb_device * device, const std::string &
int error = libusb_get_device_descriptor(device, &deviceDescriptor);
if (error != LIBUSB_SUCCESS)
{
Error(_log, "Error while retrieving device descriptor(%s): %s", error, libusb_error_name(error));
Error(_log, "Error while retrieving device descriptor(%d): %s", error, libusb_error_name(error));
return -1;
}
@ -142,7 +142,7 @@ int LedDeviceLightpack::testAndOpen(libusb_device * device, const std::string &
}
catch (int e)
{
Error(_log, "unable to retrieve serial number from Lightpack device(%s): %s", e, libusb_error_name(e));
Error(_log, "unable to retrieve serial number from Lightpack device(%d): %s", e, libusb_error_name(e));
serialNumber = "";
}
}
@ -173,7 +173,7 @@ int LedDeviceLightpack::testAndOpen(libusb_device * device, const std::string &
buffer, sizeof(buffer), 1000);
if (error < 3)
{
Error(_log, "Unable to retrieve firmware version number from Lightpack device(%s): %s", error, libusb_error_name(error));
Error(_log, "Unable to retrieve firmware version number from Lightpack device(%d): %s", error, libusb_error_name(error));
}
else
{
@ -219,7 +219,7 @@ int LedDeviceLightpack::testAndOpen(libusb_device * device, const std::string &
catch(int e)
{
_deviceHandle = nullptr;
Warning(_log, "Unable to open Lightpack device. Searching for other device(%s): %s", e, libusb_error_name(e));
Warning(_log, "Unable to open Lightpack device. Searching for other device(%d): %s", e, libusb_error_name(e));
}
}
}
@ -289,7 +289,7 @@ int LedDeviceLightpack::writeBytes(uint8_t *data, int size)
return 0;
}
Error(_log, "Unable to write %d bytes to Lightpack device(%s): %s", size, error, libusb_error_name(error));
Error(_log, "Unable to write %d bytes to Lightpack device(%d): %s", size, error, libusb_error_name(error));
return error;
}
@ -306,7 +306,7 @@ libusb_device_handle * LedDeviceLightpack::openDevice(libusb_device *device)
int error = libusb_open(device, &handle);
if (error != LIBUSB_SUCCESS)
{
Error(log, "unable to open device(%s): %s", error, libusb_error_name(error));
Error(log, "unable to open device(%d): %s", error, libusb_error_name(error));
throw error;
}
@ -316,7 +316,7 @@ libusb_device_handle * LedDeviceLightpack::openDevice(libusb_device *device)
error = libusb_detach_kernel_driver(handle, LIGHTPACK_INTERFACE);
if (error != LIBUSB_SUCCESS)
{
Error(log, "unable to detach kernel driver(%s): %s", error, libusb_error_name(error));
Error(log, "unable to detach kernel driver(%d): %s", error, libusb_error_name(error));
libusb_close(handle);
throw error;
}
@ -325,7 +325,7 @@ libusb_device_handle * LedDeviceLightpack::openDevice(libusb_device *device)
error = libusb_claim_interface(handle, LIGHTPACK_INTERFACE);
if (error != LIBUSB_SUCCESS)
{
Error(log, "unable to claim interface(%s): %s", error, libusb_error_name(error));
Error(log, "unable to claim interface(%d): %s", error, libusb_error_name(error));
libusb_attach_kernel_driver(handle, LIGHTPACK_INTERFACE);
libusb_close(handle);
throw error;

View File

@ -114,7 +114,7 @@ std::list<std::string> LedDeviceMultiLightpack::getLightpackSerials()
int error = libusb_init(&libusbContext);
if (error != LIBUSB_SUCCESS)
{
Error(log,"Error while initializing USB context(%s): %s", error, libusb_error_name(error));
Error(log,"Error while initializing USB context(%d): %s", error, libusb_error_name(error));
libusbContext = nullptr;
return serialList;
}
@ -132,7 +132,7 @@ std::list<std::string> LedDeviceMultiLightpack::getLightpackSerials()
error = libusb_get_device_descriptor(deviceList[i], &deviceDescriptor);
if (error != LIBUSB_SUCCESS)
{
Error(log, "Error while retrieving device descriptor(%s): %s", error, libusb_error_name(error));
Error(log, "Error while retrieving device descriptor(%d): %s", error, libusb_error_name(error));
continue;
}
@ -151,7 +151,7 @@ std::list<std::string> LedDeviceMultiLightpack::getLightpackSerials()
}
catch (int e)
{
Error(log,"Unable to retrieve serial number(%s): %s", e, libusb_error_name(e));
Error(log,"Unable to retrieve serial number(%d): %s", e, libusb_error_name(e));
continue;
}
}