libcutils: turn on -Werror
- Deal with some -Wunused / -Wunused-variable issues
Change-Id: I28c23fb213382a392ec30935749fb359e072d664
diff --git a/libcutils/socket_inaddr_any_server.c b/libcutils/socket_inaddr_any_server.c
index 7d5dab4..f70d56b 100644
--- a/libcutils/socket_inaddr_any_server.c
+++ b/libcutils/socket_inaddr_any_server.c
@@ -1,5 +1,4 @@
-/* libs/cutils/socket_inaddr_any_server.c
-**
+/*
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,13 +14,11 @@
** limitations under the License.
*/
-#include <cutils/sockets.h>
-
+#include <errno.h>
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <errno.h>
-#include <stddef.h>
#ifndef HAVE_WINSOCK
#include <sys/socket.h>
@@ -30,13 +27,14 @@
#include <netinet/in.h>
#endif
+#include <cutils/sockets.h>
+
#define LISTEN_BACKLOG 4
/* open listen() port on any interface */
int socket_inaddr_any_server(int port, int type)
{
struct sockaddr_in addr;
- size_t alen;
int s, n;
memset(&addr, 0, sizeof(addr));