usb_asix: fixes 64 bit warnings

This commit is contained in:
Jérôme Duval 2013-05-09 17:33:27 +02:00
parent 56dc5af735
commit 19d7d464e5
4 changed files with 10 additions and 8 deletions

View File

@ -700,7 +700,7 @@ ASIXDevice::ModifyMulticastTable(bool join, ether_address_t* group)
void
ASIXDevice::_ReadCallback(void *cookie, int32 status, void *data,
uint32 actualLength)
size_t actualLength)
{
TRACE_FLOW("ReadCB: %d bytes; status:%#010x\n", actualLength, status);
ASIXDevice *device = (ASIXDevice *)cookie;
@ -712,7 +712,7 @@ ASIXDevice::_ReadCallback(void *cookie, int32 status, void *data,
void
ASIXDevice::_WriteCallback(void *cookie, int32 status, void *data,
uint32 actualLength)
size_t actualLength)
{
TRACE_FLOW("WriteCB: %d bytes; status:%#010x\n", actualLength, status);
ASIXDevice *device = (ASIXDevice *)cookie;
@ -724,7 +724,7 @@ ASIXDevice::_WriteCallback(void *cookie, int32 status, void *data,
void
ASIXDevice::_NotifyCallback(void *cookie, int32 status, void *data,
uint32 actualLength)
size_t actualLength)
{
ASIXDevice *device = (ASIXDevice *)cookie;
atomic_add(&device->fInsideNotify, 1);

View File

@ -64,11 +64,11 @@ virtual status_t SetupDevice(bool deviceReplugged);
private:
static void _ReadCallback(void *cookie, int32 status,
void *data, uint32 actualLength);
void *data, size_t actualLength);
static void _WriteCallback(void *cookie, int32 status,
void *data, uint32 actualLength);
void *data, size_t actualLength);
static void _NotifyCallback(void *cookie, int32 status,
void *data, uint32 actualLength);
void *data, size_t actualLength);
status_t _SetupEndpoints();

View File

@ -363,7 +363,8 @@ publish_devices()
gDeviceNames[deviceCount] = (char *)malloc(strlen(sDeviceBaseName) + 4);
if (gDeviceNames[deviceCount]) {
sprintf(gDeviceNames[deviceCount], "%s%ld", sDeviceBaseName, i);
sprintf(gDeviceNames[deviceCount], "%s%" B_PRId32, sDeviceBaseName,
i);
TRACE("publishing %s\n", gDeviceNames[deviceCount]);
deviceCount++;
} else

View File

@ -96,7 +96,8 @@ void usb_asix_trace(bool force, const char* func, const char *fmt, ...)
bigtime_t time = system_time();
uint32 msec = time / 1000;
uint32 sec = msec / 1000;
sprintf(buf_ptr, "%02ld.%02ld.%03ld:", sec / 60, sec % 60, msec % 1000);
sprintf(buf_ptr, "%02" B_PRId32 ".%02" B_PRId32 ".%03" B_PRId32 ":",
sec / 60, sec % 60, msec % 1000);
buf_ptr += strlen(buf_ptr);
}