}
if ((SCConfGetChildValueIntWithDefault(if_root, if_default, "buffer-size", &value)) == 1) {
- aconf->buffer_size = value;
+ aconf->buffer_size = (int)value;
} else {
aconf->buffer_size = 0;
}
if ((SCConfGetChildValueIntWithDefault(if_root, if_default, "ring-size", &value)) == 1) {
- aconf->ring_size = value;
+ aconf->ring_size = (int)value;
}
if ((SCConfGetChildValueIntWithDefault(if_root, if_default, "block-size", &value)) == 1) {
SCLogWarning("%s: block-size %" PRIuMAX " must be a multiple of pagesize (%u).", iface,
value, getpagesize());
} else {
- aconf->block_size = value;
+ aconf->block_size = (int)value;
}
}
if ((SCConfGetChildValueIntWithDefault(if_root, if_default, "block-timeout", &value)) == 1) {
- aconf->block_timeout = value;
+ aconf->block_timeout = (int)value;
} else {
aconf->block_timeout = 10;
}
SCLogWarning("%s: v2-block-size %" PRIuMAX " must be a multiple of pagesize (%u).",
iface, value, getpagesize());
} else {
- aconf->v2_block_size = value;
+ aconf->v2_block_size = (int)value;
}
}
{
if (p->afp_v.vlan_tci != 0) {
uint8_t *pstart = GET_PKT_DATA(p) - VLAN_HEADER_LEN;
- size_t plen = GET_PKT_LEN(p) + VLAN_HEADER_LEN;
+ uint32_t plen = GET_PKT_LEN(p) + VLAN_HEADER_LEN;
/* move ethernet addresses */
memmove(pstart, GET_PKT_DATA(p), 2 * ETH_ALEN);
/* write vlan info */
})
#else
-#define SCGetThreadIdLong(...) ({ \
- pid_t tmpthid; \
- tmpthid = syscall(SYS_gettid); \
- unsigned long _scgetthread_tid = (unsigned long)tmpthid; \
- _scgetthread_tid; \
-})
+#define SCGetThreadIdLong(...) \
+ ({ \
+ pid_t tmpthid; \
+ tmpthid = (pid_t)syscall(SYS_gettid); \
+ unsigned long _scgetthread_tid = (unsigned long)tmpthid; \
+ _scgetthread_tid; \
+ })
#endif /* OS FREEBSD */
extern thread_local char t_thread_name[THREAD_NAME_LEN + 1];
if (fd < 0)
return -errno;
- if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) + path_length) != 0)
+ if (connect(fd, &socket_addr.sa,
+ offsetof(struct sockaddr_un, sun_path) + (uint32_t)path_length) != 0)
return -errno;
ssize_t written = write(fd, message, message_length);