Subject: | Warning on compile of iOS for dig |
Date: | Fri, 03 Nov 2017 13:05:17 +0000 |
To: | bind9-public@isc.org |
From: | ray@isc.org |
This macro from lib/isc/include/isc/buffer.h causes a warning on the assignment of _length because `strlen()` returns `size_t`, not `unsigned int`.
#define ISC__BUFFER_PUTSTR(_b, _source) \
do { \
unsigned int _length; \
unsigned char *_cp; \
_length = strlen(_source); \
if (ISC_UNLIKELY((_b)->autore)) { \
isc_buffer_t *_tmp = _b; \
REQUIRE(isc_buffer_reserve(&_tmp, _length) \
== ISC_R_SUCCESS); \
} \
REQUIRE(isc_buffer_availablelength(_b) >= (unsigned int) _length); \
_cp = isc_buffer_used(_b); \
memmove(_cp, (_source), _length); \
(_b)->used += (_length); \
} while (0)