Replace QUADFMT with %ju and QUADXFMT with %jx and cast values with uintmax_t
This will cure some -Wformat warnings MFC after: 1 week Reported by: clang, gcc Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
70e366f272
commit
d208c8fa3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299807
@ -823,7 +823,8 @@ parse_oid(const char *varname, struct asn_oid *oid)
|
|||||||
while (token == '.') {
|
while (token == '.') {
|
||||||
if (gettoken() == TOK_NUM) {
|
if (gettoken() == TOK_NUM) {
|
||||||
if (numval > ASN_MAXID)
|
if (numval > ASN_MAXID)
|
||||||
report("subid too large %#"QUADXFMT, numval);
|
report("subid too large %#jx",
|
||||||
|
(uintmax_t)numval);
|
||||||
if (oid->len == ASN_MAXOIDLEN)
|
if (oid->len == ASN_MAXOIDLEN)
|
||||||
report("index too long");
|
report("index too long");
|
||||||
if (gettoken() != ':')
|
if (gettoken() != ':')
|
||||||
@ -878,7 +879,7 @@ parse_syntax_integer(struct snmp_value *value)
|
|||||||
if (token != TOK_NUM)
|
if (token != TOK_NUM)
|
||||||
report("bad INTEGER syntax");
|
report("bad INTEGER syntax");
|
||||||
if (numval > 0x7fffffff)
|
if (numval > 0x7fffffff)
|
||||||
report("INTEGER too large %"QUADFMT, numval);
|
report("INTEGER too large %ju", (uintmax_t)numval);
|
||||||
|
|
||||||
value->v.integer = numval;
|
value->v.integer = numval;
|
||||||
gettoken();
|
gettoken();
|
||||||
|
@ -27,7 +27,7 @@ DEFSDIR= ${SHAREDIR}/snmp/defs
|
|||||||
|
|
||||||
CFLAGS+= -DSNMPTREE_TYPES
|
CFLAGS+= -DSNMPTREE_TYPES
|
||||||
CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
|
CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
|
||||||
CFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
|
CFLAGS+= -DUSE_TCPWRAPPERS
|
||||||
CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
|
CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
|
||||||
LIBADD= begemot bsnmp wrap
|
LIBADD= begemot bsnmp wrap
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user