-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.21, 5.4.12rc1, 6.0.3rc1, 6.2.0alpha1, 6.2 (plan)
-
None
-
Sprint 87 (Apr 2022), Sprint 88 (May 2022)
-
1
Create LLD rule that discover host and try to update inventory.
Notice error:
Incorrect value "255" for "ipmi_authtype" field.
Incorrect value "255" for "inventory_mode" field.
Also warnings:
host.c: In function ‘DBhost_prototypes_save’: host.c:3525:53: warning: comparison is always true due to limited range of data type [-Wtype-limits] 3525 | if (HOST_INVENTORY_DISABLED != host_prototype->inventory_mode) | ^~ host.c:3535:61: warning: comparison is always false due to limited range of data type [-Wtype-limits] 3535 | if (HOST_INVENTORY_DISABLED == host_prototype->inventory_mode) | ^~ host.c:3537:66: warning: comparison is always false due to limited range of data type [-Wtype-limits] 3537 | else if (HOST_INVENTORY_DISABLED == host_prototype->inventory_mode_orig) | ^~ host.c:3754:53: warning: comparison is always true due to limited range of data type [-Wtype-limits] 3754 | if (HOST_INVENTORY_DISABLED != host_prototype->inventory_mode) | ^~ host.c:3813:61: warning: comparison is always true due to limited range of data type [-Wtype-limits] 3813 | if (HOST_INVENTORY_DISABLED != host_prototype->inventory_mode) | ^~ host.c:3815:69: warning: comparison is always false due to limited range of data type [-Wtype-limits] 3815 | if (HOST_INVENTORY_DISABLED == host_prototype->inventory_mode_orig)
execute.c: In function ‘eval_execute_function_ascii’: execute.c:2076:71: warning: comparison is always false due to limited range of data type [-Wtype-limits] 2076 | if (SUCCEED != zbx_variant_convert(arg, ZBX_VARIANT_STR) || 0 > *arg->data.str) |
lld_host.c: In function ‘lld_hosts_save’: lld_host.c:2694:53: warning: comparison is always true due to limited range of data type [-Wtype-limits] 2694 | if (HOST_INVENTORY_DISABLED != host->inventory_mode) | ^~ lld_host.c:2710:61: warning: comparison is always false due to limited range of data type [-Wtype-limits] 2710 | if (HOST_INVENTORY_DISABLED == host->inventory_mode) | ^~ lld_host.c:2712:66: warning: comparison is always false due to limited range of data type [-Wtype-limits] 2712 | else if (HOST_INVENTORY_DISABLED == host->inventory_mode_orig) | ^~ lld_host.c:2928:53: warning: comparison is always true due to limited range of data type [-Wtype-limits] 2928 | if (HOST_INVENTORY_DISABLED != host->inventory_mode) | ^~ lld_host.c:3113:65: warning: comparison is always false due to limited range of data type [-Wtype-limits] 3113 | HOST_INVENTORY_DISABLED == host->inventory_mode_orig) |
Expected:
Use int to avoid undefined behaviour