[ZBX-11122] Remove signed and unsigned comparison warnings Created: 2016 Aug 23 Updated: 2017 May 30 Resolved: 2016 Oct 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Proxy (P), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Andris Zeila | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Following from Making all in linux hardware.c: In function ‘print_freq’: hardware.c:266:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (HW_CPU_SHOW_MAXFREQ == filter && FAIL != maxfreq) ^ hardware.c:273:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (HW_CPU_SHOW_CURFREQ == filter && FAIL != curfreq) ^ hardware.c:282:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (FAIL != curfreq) ^ hardware.c:285:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (FAIL != maxfreq) ^ hardware.c: In function ‘SYSTEM_HW_CPU’: hardware.c:361:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] FAIL != (maxfreq = get_cpu_max_freq(cur_cpu))) ^ proc.c: In function ‘proc_create’: proc.c:1198:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < cmdline_nbytes - 1; i++) ^ swap.c: In function ‘get_swap_dev_stat’: swap.c:140:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (rdev_major == major(dev_st.st_rdev) && rdev_minor == minor(dev_st.st_rdev)) ^ swap.c:140:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (rdev_major == major(dev_st.st_rdev) && rdev_minor == minor(dev_st.st_rdev)) ... ^ Making all in zbxjson json.c: In function ‘zbx_json_copy_string’: json.c:656:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (out - start == size) ^ |
Comments |
Comment by Andris Zeila [ 2016 Aug 23 ] |
With --with-jabber option:
Making all in zbxmedia
jabber.c: In function ‘zbx_io_send’:
jabber.c:123:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (write(*sock, data, len) < len)
^
With --with-unixodbc option: Making all in poller checks_db.c: In function ‘get_result_columns’: checks_db.c:40:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (SQL_SUCCESS != rc || sizeof(str) <= len || '\0' == *str) ^ checks_snmp.c: In function ‘zbx_snmp_process_dynamic’: checks_snmp.c:1957:27: warning: passing argument 10 of ‘zbx_snmp_walk’ from incompatible pointer type min_fail, num, bulk, zbx_snmp_walk_cache_cb, (void *)&items[j]); ^ checks_snmp.c:1009:12: note: expected ‘void (*)(void *, const char *, const char *)’ but argument is of type ‘void (*)(void *, const char *, const char *, const char *)’ static int zbx_snmp_walk(struct snmp_session *ss, const DC_ITEM *item, const char *OID, char *error, ^ |
Comment by Sergejs Paskevics [ 2016 Oct 05 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-11122 |
Comment by Andris Zeila [ 2016 Oct 11 ] |
Successfully tested |
Comment by Sergejs Paskevics [ 2016 Oct 17 ] |
Fixed in:
|