[ZBX-11422] Compilation warnings under OS X Created: 2016 Nov 03  Updated: 2024 Apr 10  Resolved: 2018 Jan 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: None
Fix Version/s: 4.0.0alpha3, 4.0 (plan)

Type: Incident report Priority: Minor
Reporter: Alexander Vladishev Assignee: Michael Veksler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team C
Sprint: Sprint 24, Sprint 25
Story Points: 1

 Description   
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libzbxnix.a(coredump.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libzbxnix.a(coredump.o) has no symbols
sysinfo.c:409:35: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
                        printf(" [u|" ZBX_FS_UI64 "]", result.ui64);
                                                       ^~~~~~~~~~~
sysinfo.c:695:7: warning: format specifies type 'unsigned long *' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Wformat]
                                                ZBX_OCT2UINT64(value_uint64, c);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../include/zbxtypes.h:157:66: note: expanded from macro 'ZBX_OCT2UINT64'
#define ZBX_OCT2UINT64(uint, string) sscanf(string, ZBX_FS_UO64, &uint)
                                                                 ^~~~~
sysinfo.c:710:7: warning: format specifies type 'unsigned long *' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Wformat]
                                                ZBX_HEX2UINT64(value_uint64, c);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../include/zbxtypes.h:158:66: note: expanded from macro 'ZBX_HEX2UINT64'
#define ZBX_HEX2UINT64(uint, string) sscanf(string, ZBX_FS_UX64, &uint)
                                                                 ^~~~~
sysinfo.c:717:7: warning: format specifies type 'unsigned long *' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Wformat]
                                                ZBX_HEX2UINT64(value_uint64, c);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../include/zbxtypes.h:158:66: note: expanded from macro 'ZBX_HEX2UINT64'
#define ZBX_HEX2UINT64(uint, string) sscanf(string, ZBX_FS_UX64, &uint)
                                                                 ^~~~~
4 warnings generated.


 Comments   
Comment by Alexander Vladishev [ 2016 Nov 03 ]

This issue related to -t and -p zabbix_agentd options and also to items with "Numeric (unsigned)" value type and "Octal" and "Decimal" data types.

Comment by Glebs Ivanovskis (Inactive) [ 2017 Dec 29 ]

FYI: Format macro constants like PRIu64 and SCNu64 are supported since C99, maybe we can consider using them instead of ZBX_FS_UI64.

Comment by Vladislavs Sokurenko [ 2018 Jan 09 ]

Successfully tested

Generated at Fri Apr 26 08:34:02 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.