From 1aec12613c7de09ddcc444dd7da481333eb86678 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Thu, 31 May 2012 14:09:35 +0100 Subject: [PATCH] Ditch a couple of unneeded variables to silence gcc warnings --- src/parse.c | 3 +-- src/serve.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/parse.c b/src/parse.c index e5dab6c..f67bf46 100644 --- a/src/parse.c +++ b/src/parse.c @@ -82,8 +82,7 @@ int parse_acl(struct ip_and_mask (**out)[], int max, char **entries) } for (i=0; i < max; i++) { - struct ip_and_mask* entry = list[i]; - debug("acl entry %d @ %p has mask %d", i, entry, entry->mask); + debug("acl entry %d @ %p has mask %d", i, list[i], list[i]->mask); } return max; diff --git a/src/serve.c b/src/serve.c index a83d53f..343451a 100644 --- a/src/serve.c +++ b/src/serve.c @@ -421,7 +421,8 @@ int cleanup_and_find_client_slot(struct mode_serve_params* params) strcpy(s_client_address, "???"); inet_ntop( params->nbd_client[i].address.generic.sa_family, - sockaddr_address_data(¶ms->nbd_client[i].address.generic), s_client_address, + sockaddr_address_data(¶ms->nbd_client[i].address.generic), + s_client_address, 64 ); @@ -430,9 +431,8 @@ int cleanup_and_find_client_slot(struct mode_serve_params* params) SERVER_ERROR_ON_FAILURE(-1, "Problem with joining thread"); } else { - uint64_t status1 = (uint64_t) status; params->nbd_client[i].thread = 0; - debug("nbd thread %d exited (%s) with status %ld", (int) params->nbd_client[i].thread, s_client_address, status1); + debug("nbd thread %d exited (%s) with status %ld", (int) params->nbd_client[i].thread, s_client_address, (uint64_t)status); } }