[ZBX-10768] Warnings when compiling agent on FreeBSD Created: 2016 May 09 Updated: 2017 May 30 Resolved: 2016 Aug 05 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 3.2.0alpha1 |
Fix Version/s: | 3.2.0alpha1 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Glebs Ivanovskis (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | compilation, freebsd, warning | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
FreeBSD |
Description |
misc.c:430:15: warning: format string is not a string literal (potentially insecure) [-Wformat-security] setproctitle(title); ^~~~~ 1 warning generated. str.c:2702:35: warning: passing 'char **' to parameter of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] while ((size_t)(-1) == iconv(cd, &in, &in_size_left, &p, &out_size_left)) ^~~ /usr/include/iconv.h:56:47: note: passing argument to parameter here size_t iconv(iconv_t, const char ** __restrict, ^ 1 warning generated. |
Comments |
Comment by Viktors Tjarve [ 2016 Jun 30 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10768 It is debatable weather or not introduction of function zbx_iconv() is justified to eliminate 2nd warning from above in description section. Maybe this warning can be ignored because of its insignificance. |
Comment by Viktors Tjarve [ 2016 Jul 01 ] |
Second warning appears in BSD systems because they are based on an older POSIX standard then Zabbix. That is in newer versions iconv() function prototypes second paremeter is of type 'char **' rather then type 'const char **'. This warning won't be fixed. |
Comment by Sandis Neilands (Inactive) [ 2016 Jul 01 ] |
Successfully tested. |
Comment by Viktors Tjarve [ 2016 Jul 01 ] |
Released in:
|