src/dict-splay.c (dict_sanity_check_node): Cast struct pointers to void*
when passing them to snprintf().
src/helpfile.c (vsend_message): Likewise for log_module().
src/mod-sockcheck.c (sockcheck_free_client): Likewise.
(sockcheck_print_client): Likewise.
(sockcheck_elaborate_state): Likewise.
(sockcheck_advance): Likewise.
(sockcheck_begin_test): Likewise.
(sockcheck_start_client): Likewise.
src/proto-p10.c (AddUser): Likewise.
src/sar.c (sar_fd_readable): Likewise.
(sar_getaddr_append): Likewise.
{
verify(node);
if (!node->key) {
{
verify(node);
if (!node->key) {
- snprintf(dss->error, sizeof(dss->error), "Node %p had null key", node);
+ snprintf(dss->error, sizeof(dss->error), "Node %p had null key", (void*)node);
return 1;
}
if (node->l) {
if (dict_sanity_check_node(node->l, dss)) return 1;
if (irccasecmp(node->l->key, node->key) >= 0) {
return 1;
}
if (node->l) {
if (dict_sanity_check_node(node->l, dss)) return 1;
if (irccasecmp(node->l->key, node->key) >= 0) {
- snprintf(dss->error, sizeof(dss->error), "Node %p's left child's key '%s' >= its key '%s'", node, node->l->key, node->key);
+ snprintf(dss->error, sizeof(dss->error), "Node %p's left child's key '%s' >= its key '%s'", (void*)node, node->l->key, node->key);
return 1;
}
}
if (node->r) {
if (dict_sanity_check_node(node->r, dss)) return 1;
if (irccasecmp(node->key, node->r->key) >= 0) {
return 1;
}
}
if (node->r) {
if (dict_sanity_check_node(node->r, dss)) return 1;
if (irccasecmp(node->key, node->r->key) >= 0) {
- snprintf(dss->error, sizeof(dss->error), "Node %p's right child's key '%s' <= its key '%s'", node, node->r->key, node->key);
+ snprintf(dss->error, sizeof(dss->error), "Node %p's right child's key '%s' <= its key '%s'", (void*)node, node->r->key, node->key);
break;
default:
value = "";
break;
default:
value = "";
- log_module(MAIN_LOG, LOG_ERROR, "Invalid exp.type %d from expansion function %p.", exp.type, expand_f);
+ log_module(MAIN_LOG, LOG_ERROR, "Invalid exp.type %d from expansion function %p.", exp.type, (void*)expand_f);
break;
}
ipos = name_end - input.list;
break;
}
ipos = name_end - input.list;
sockcheck_free_client(struct sockcheck_client *client)
{
if (SOCKCHECK_DEBUG) {
sockcheck_free_client(struct sockcheck_client *client)
{
if (SOCKCHECK_DEBUG) {
- log_module(PC_LOG, LOG_INFO, "Goodbye %s (%p)! I set you free!", client->addr->hostname, client);
+ log_module(PC_LOG, LOG_INFO, "Goodbye %s (%p)! I set you free!", client->addr->hostname, (void*)client);
}
verify(client);
ioset_close(client->fd, 1);
}
verify(client);
ioset_close(client->fd, 1);
log_module(PC_LOG, LOG_INFO, "client %p: { addr = %p { decision = %s; last_touched = %lu; reason = %s; hostname = \"%s\" }; "
"test_index = %d; state = %p { port = %d; type = %s; template = \"%s\"; ... }; "
"fd = %p(%d); read = %p; read_size = %d; read_used = %d; read_pos = %d; }",
log_module(PC_LOG, LOG_INFO, "client %p: { addr = %p { decision = %s; last_touched = %lu; reason = %s; hostname = \"%s\" }; "
"test_index = %d; state = %p { port = %d; type = %s; template = \"%s\"; ... }; "
"fd = %p(%d); read = %p; read_size = %d; read_used = %d; read_pos = %d; }",
- client, client->addr, decs[client->addr->decision],
+ (void*)client, (void*)client->addr, decs[client->addr->decision],
client->addr->last_touched,
client->addr->reason, client->addr->hostname,
client->addr->last_touched,
client->addr->reason, client->addr->hostname,
- client->test_index, client->state,
+ client->test_index, (void*)client->state,
(client->state ? client->state->port : 0),
(client->state ? decs[client->state->type] : "N/A"),
(client->state ? client->state->template : "N/A"),
(client->state ? client->state->port : 0),
(client->state ? decs[client->state->type] : "N/A"),
(client->state ? client->state->template : "N/A"),
- client->fd, (client->fd ? client->fd->fd : 0),
- client->read, client->read_size, client->read_used, client->read_pos);
+ (void*)client->fd, (client->fd ? client->fd->fd : 0),
+ (void*)client->read, client->read_size, client->read_used, client->read_pos);
}
static char hexvals[256] = {
}
static char hexvals[256] = {
/* If it doesn't require reading, take it now. */
if (client->resp_state[nn] && !*client->resp_state[nn]) {
if (SOCKCHECK_DEBUG) {
/* If it doesn't require reading, take it now. */
if (client->resp_state[nn] && !*client->resp_state[nn]) {
if (SOCKCHECK_DEBUG) {
- log_module(PC_LOG, LOG_INFO, "Skipping straight to easy option %d for %p.", nn, client);
+ log_module(PC_LOG, LOG_INFO, "Skipping straight to easy option %d for %p.", nn, (void*)client);
}
sockcheck_advance(client, nn);
return;
}
sockcheck_advance(client, nn);
return;
- log_module(PC_LOG, LOG_ERROR, "BUG: unknown next-state type %d (after %p).", ns->type, client->state);
+ log_module(PC_LOG, LOG_ERROR, "BUG: unknown next-state type %d (after %p).", ns->type, (void*)client->state);
io_fd->readable_cb = sockcheck_readable;
timeq_add(now + client->state->timeout, sockcheck_timeout_client, client);
if (SOCKCHECK_DEBUG) {
io_fd->readable_cb = sockcheck_readable;
timeq_add(now + client->state->timeout, sockcheck_timeout_client, client);
if (SOCKCHECK_DEBUG) {
- log_module(PC_LOG, LOG_INFO, "Starting proxy check on %s:%d (test %d) with fd %d (%p).", client->addr->hostname, client->state->port, client->test_index, io_fd->fd, io_fd);
+ log_module(PC_LOG, LOG_INFO, "Starting proxy check on %s:%d (test %d) with fd %d (%p).", client->addr->hostname, client->state->port, client->test_index, io_fd->fd, (void*)io_fd);
}
return;
} while (client->test_index < client->tests->used);
}
return;
} while (client->test_index < client->tests->used);
sockcheck_num_clients++;
if (!tests) return;
client = client_list[idx] = sockcheck_alloc_client(sci);
sockcheck_num_clients++;
if (!tests) return;
client = client_list[idx] = sockcheck_alloc_client(sci);
- log_module(PC_LOG, LOG_INFO, "Proxy-checking client at %s as client %d (%p) of %d.", sci->hostname, idx, client, sockcheck_num_clients);
+ log_module(PC_LOG, LOG_INFO, "Proxy-checking client at %s as client %d (%p) of %d.", sci->hostname, idx, (void*)client, sockcheck_num_clients);
client->test_rep = 0;
client->client_index = idx;
sockcheck_begin_test(client);
client->test_rep = 0;
client->client_index = idx;
sockcheck_begin_test(client);
unsigned int n, ignore_user, dummy;
if ((strlen(numeric) < 3) || (strlen(numeric) > 5)) {
unsigned int n, ignore_user, dummy;
if ((strlen(numeric) < 3) || (strlen(numeric) > 5)) {
- log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): numeric %s wrong length!", uplink, nick, numeric);
+ log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): numeric %s wrong length!", (void*)uplink, nick, numeric);
return NULL;
}
if (!uplink) {
return NULL;
}
if (!uplink) {
- log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server for numeric %s doesn't exist!", uplink, nick, numeric);
+ log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server for numeric %s doesn't exist!", (void*)uplink, nick, numeric);
return NULL;
}
if (uplink != GetServerN(numeric)) {
return NULL;
}
if (uplink != GetServerN(numeric)) {
- log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server for numeric %s differs from nominal uplink %s.", uplink, nick, numeric, uplink->name);
+ log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): server for numeric %s differs from nominal uplink %s.", (void*)uplink, nick, numeric, uplink->name);
if (dummy) {
++modes;
} else if (!is_valid_nick(nick)) {
if (dummy) {
++modes;
} else if (!is_valid_nick(nick)) {
- log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): invalid nickname detected.", uplink, nick);
+ log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): invalid nickname detected.", (void*)uplink, nick);
sprintf(id_text, "%d", hdr.id);
req = dict_find(sar_requests, id_text, NULL);
sprintf(id_text, "%d", hdr.id);
req = dict_find(sar_requests, id_text, NULL);
- log_module(sar_log, LOG_DEBUG, "sar_fd_readable(%p): hdr {id=%d, flags=0x%x, qdcount=%d, ancount=%d, nscount=%d, arcount=%d} -> req %p", fd, hdr.id, hdr.flags, hdr.qdcount, hdr.ancount, hdr.nscount, hdr.arcount, req);
+ log_module(sar_log, LOG_DEBUG, "sar_fd_readable(%p): hdr {id=%d, flags=0x%x, qdcount=%d, ancount=%d, nscount=%d, arcount=%d} -> req %p", (void*)fd, hdr.id, hdr.flags, hdr.qdcount, hdr.ancount, hdr.nscount, hdr.arcount, (void*)req);
if (!req || !req->retries || !(hdr.flags & REQ_FLAG_QR)) {
ns->resp_ignored++;
return;
if (!req || !req->retries || !(hdr.flags & REQ_FLAG_QR)) {
ns->resp_ignored++;
return;
- log_module(sar_log, LOG_DEBUG, "sar_getaddr_append({full_name=%s}, ai=%p, copy=%d)", state->full_name, ai, copy);
+ log_module(sar_log, LOG_DEBUG, "sar_getaddr_append({full_name=%s}, ai=%p, copy=%d)", state->full_name, (void*)ai, copy);
/* Set the appropriate pointer to the new element(s). */
if (state->ai_tail)
/* Set the appropriate pointer to the new element(s). */
if (state->ai_tail)