src/netlink.c:546:13: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (r >= sizeof(type_instance)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~
src/netlink.c:585:13: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (r >= sizeof(type_instance)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~
int r = snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type,
tc_inst);
int r = snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type,
tc_inst);
- if (r >= sizeof(type_instance)) {
+ if ((size_t)r >= sizeof(type_instance)) {
ERROR("netlink plugin: type_instance truncated to %zu bytes, need %d",
sizeof(type_instance), r);
return MNL_CB_ERROR;
ERROR("netlink plugin: type_instance truncated to %zu bytes, need %d",
sizeof(type_instance), r);
return MNL_CB_ERROR;
int r = snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type,
tc_inst);
int r = snprintf(type_instance, sizeof(type_instance), "%s-%s", tc_type,
tc_inst);
- if (r >= sizeof(type_instance)) {
+ if ((size_t)r >= sizeof(type_instance)) {
ERROR("netlink plugin: type_instance truncated to %zu bytes, need %d",
sizeof(type_instance), r);
return MNL_CB_ERROR;
ERROR("netlink plugin: type_instance truncated to %zu bytes, need %d",
sizeof(type_instance), r);
return MNL_CB_ERROR;