Mark intentionally unused parameters as such (with "UNUSED")

This commit is contained in:
practicalswift
2018-02-21 16:06:07 +01:00
committed by Rusty Russell
parent 3dbace3421
commit 91a9c2923f
38 changed files with 85 additions and 85 deletions

View File

@@ -42,7 +42,7 @@ static void tal_freefn(void *ptr)
struct netaddr;
char *netaddr_name(const tal_t *ctx, const struct netaddr *a);
char *netaddr_name(const tal_t *ctx, const struct netaddr *a)
char *netaddr_name(const tal_t *ctx UNUSED, const struct netaddr *a UNUSED)
{
return NULL;
}

View File

@@ -30,14 +30,14 @@ char *version_and_exit(const void *unused UNNEEDED)
{ fprintf(stderr, "version_and_exit called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int test_socket(int domain, int type, int protocol)
int test_socket(int domain UNUSED, int type UNUSED, int protocol UNUSED)
{
/* We give a real fd, as it writes to it */
return open("/dev/null", O_WRONLY);
}
int test_connect(int sockfd, const struct sockaddr *addr,
socklen_t addrlen)
int test_connect(int sockfd UNUSED, const struct sockaddr *addr UNUSED,
socklen_t addrlen UNUSED)
{
return 0;
}
@@ -47,7 +47,7 @@ int test_getpid(void)
return 9999;
}
int test_printf(const char *fmt, ...)
int test_printf(const char *fmt UNUSED, ...)
{
return 0;
}
@@ -55,7 +55,7 @@ int test_printf(const char *fmt, ...)
static char *response;
static size_t response_off, max_read_return;
ssize_t test_read(int fd, void *buf, size_t len)
ssize_t test_read(int fd UNUSED, void *buf, size_t len)
{
if (len > max_read_return)
len = max_read_return;
@@ -82,7 +82,7 @@ ssize_t test_read(int fd, void *buf, size_t len)
" {\"type\": \"DEBUG\", \"time\": \"241693.051558854\", \"source\": \"lightning_gossipd(14581):\", \"log\": \"TRACE: nonlocal_gossip_broadcast_done\"},\n"
#define TAILER "] } }"
int main(int argc, char *argv[])
int main(int argc UNUSED, char *argv[])
{
char *fake_argv[] = { argv[0], "--lightning-dir=/tmp/", "test", NULL };