virt plugin: fix a few sign compare warnings
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 29 May 2018 13:57:00 +0000 (15:57 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 29 May 2018 13:57:00 +0000 (15:57 +0200)
commitc10379655f3ab88a1bfd657eeccc311c3c943f38
tree70f7862b0ec783af1a4144991025f136dea98203
parent6eb269f494c039f1ff94f4771ac7ebf9f2783cba
virt plugin: fix a few sign compare warnings

  CC       src/virt_la-virt.lo
src/virt.c: In function ‘domain_state_submit_notif’:
src/virt.c:1019:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   if ((state < 0) || (state >= STATIC_ARRAY_SIZE(domain_states))) {
                             ^~
src/virt.c:1027:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   if ((reason < 0) || (reason >= STATIC_ARRAY_SIZE(domain_reasons[0]))) {
                               ^~
src/virt.c: In function ‘fs_info_notify’:
src/virt.c:1612:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
   for (int i = 0; i < fs_info->ndevAlias; ++i) {
                     ^
src/virt.c:1587:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
     for (int _i = 0; _i < _size; ++_i) {                                       \
                         ^
src/virt.c:1619:3: note: in expansion of macro ‘NM_ADD_STR_ITEMS’
   NM_ADD_STR_ITEMS(fs_str_items, STATIC_ARRAY_SIZE(fs_str_items));
   ^~~~~~~~~~~~~~~~
src/virt.c:1587:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     for (int _i = 0; _i < _size; ++_i) {                                       \
                         ^
src/virt.c:1622:3: note: in expansion of macro ‘NM_ADD_STR_ITEMS’
   NM_ADD_STR_ITEMS(fs_dev_alias, fs_info->ndevAlias);
   ^~~~~~~~~~~~~~~~
  CCLD     virt.la
src/virt.c