3720. [bug] Address compiler warnings. [RT #35261]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
3720. [bug] Address compiler warnings. [RT #35261]
|
||||
|
||||
3719. [bug] Address memory leak in in peer.c. [RT #35255]
|
||||
|
||||
3718. [bug] A missing ISC_LINK_INIT in log.c. [RT #35260]
|
||||
|
||||
@@ -324,13 +324,26 @@ main(int argc, char **argv) {
|
||||
* XXXDCL NT
|
||||
*/
|
||||
fputc('\n', stderr);
|
||||
system("head " TEST_FILE "*; rm -f " TEST_FILE "*");
|
||||
if (system("head " TEST_FILE "*; rm -f " TEST_FILE "*") != 0) {
|
||||
fprintf(stderr, "system(\"head " TEST_FILE "*; rm -f "
|
||||
TEST_FILE "*\") failed\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
freopen(syslog_file, "r", stdin);
|
||||
/* This is highly system specific. */
|
||||
if (freopen(syslog_file, "r", stdin) == NULL) {
|
||||
fprintf(stderr, "freopen(%s, \"r\", stdin) failed\n",
|
||||
syslog_file);
|
||||
goto cleanup;
|
||||
}
|
||||
fprintf(stderr, "\n==> %s <==\n", syslog_file);
|
||||
system("tail -2");
|
||||
if (system("tail -2") != 0) {
|
||||
fprintf(stderr, "system(\"tail -2\") failed\n");
|
||||
goto cleanup;
|
||||
}
|
||||
fputc('\n', stderr);
|
||||
|
||||
cleanup:
|
||||
isc_log_destroy(&lctx);
|
||||
|
||||
if (show_final_mem)
|
||||
|
||||
@@ -987,6 +987,31 @@ dns_rbtnodechain_nextflat(dns_rbtnodechain_t *chain, dns_name_t *name);
|
||||
#define dns_rbtnode_refinit(node, n) ((node)->references = (n))
|
||||
#define dns_rbtnode_refdestroy(node) REQUIRE((node)->references == 0)
|
||||
#define dns_rbtnode_refcurrent(node) ((node)->references)
|
||||
|
||||
#if (__STDC_VERSION__ + 0) >= 199901L || defined __GNUC__
|
||||
static inline void
|
||||
dns_rbtnode_refincrement0(dns_rbtnode_t *node, unsigned int *refs) {
|
||||
node->references++;
|
||||
if (refs != NULL)
|
||||
*refs = node->references;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dns_rbtnode_refincrement(dns_rbtnode_t *node, unsigned int *refs) {
|
||||
REQUIRE(node->references > 0);
|
||||
node->references++;
|
||||
if (refs != NULL)
|
||||
*refs = node->references;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dns_rbtnode_refdecrement(dns_rbtnode_t *node, unsigned int *refs) {
|
||||
REQUIRE(node->references > 0);
|
||||
node->references--;
|
||||
if (refs != NULL)
|
||||
*refs = node->references;
|
||||
}
|
||||
#else
|
||||
#define dns_rbtnode_refincrement0(node, refs) \
|
||||
do { \
|
||||
unsigned int *_tmp = (unsigned int *)(refs); \
|
||||
@@ -1008,6 +1033,7 @@ dns_rbtnodechain_nextflat(dns_rbtnodechain_t *chain, dns_name_t *name);
|
||||
if ((refs) != NULL) \
|
||||
(*refs) = (node)->references; \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif /* DNS_RBT_USEISCREFCOUNT */
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
Reference in New Issue
Block a user