summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Tribble <peter.tribble@gmail.com>2018-08-11 20:53:08 +0100
committerDan McDonald <danmcd@joyent.com>2018-08-13 14:57:38 -0400
commit2c5ec7a875dcd76853e6618614e990f1e8cdd56d (patch)
tree479f4be77a1954125b2fc21810860d0ecfbc2003
parent309b04b88ca20521fb8141c40ad19b8528b37d7d (diff)
downloadillumos-joyent-2c5ec7a875dcd76853e6618614e990f1e8cdd56d.tar.gz
9725 getent has unused variables and implicit function declarations
Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net> Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/getent/Makefile4
-rw-r--r--usr/src/cmd/getent/dogetnetmask.c4
-rw-r--r--usr/src/cmd/getent/dogetsp.c3
3 files changed, 4 insertions, 7 deletions
diff --git a/usr/src/cmd/getent/Makefile b/usr/src/cmd/getent/Makefile
index b11e0a6e2c..571f49b150 100644
--- a/usr/src/cmd/getent/Makefile
+++ b/usr/src/cmd/getent/Makefile
@@ -20,6 +20,7 @@
#
#
+# Copyright (c) 2018 Peter Tribble.
# Copyright (c) 2014 Gary Mills
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
@@ -29,9 +30,6 @@ PROG= getent
include ../Makefile.cmd
-CERRWARN += -_gcc=-Wno-unused-variable
-CERRWARN += -_gcc=-Wno-implicit-function-declaration
-
OBJECTS= \
dogetethers.o \
dogetgr.o \
diff --git a/usr/src/cmd/getent/dogetnetmask.c b/usr/src/cmd/getent/dogetnetmask.c
index 74fa0d39c6..38326bad48 100644
--- a/usr/src/cmd/getent/dogetnetmask.c
+++ b/usr/src/cmd/getent/dogetnetmask.c
@@ -19,9 +19,9 @@
*
* CDDL HEADER END
*/
-#ident "%Z%%M% %I% %E% SMI"
/*
+ * Copyright (c) 2018 Peter Tribble.
* Copyright (c) 1994-1996, by Sun Microsystems, Inc.
* All rights reserved.
*/
@@ -34,6 +34,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <libsocket_priv.h>
#include "getent.h"
extern char *inet_nettoa(struct in_addr in);
@@ -41,7 +42,6 @@ extern char *inet_nettoa(struct in_addr in);
static int
putnetmask(const struct in_addr key, const struct in_addr netmask, FILE *fp)
{
- char **p;
int rc = 0;
struct in_addr net;
diff --git a/usr/src/cmd/getent/dogetsp.c b/usr/src/cmd/getent/dogetsp.c
index 11c09e2419..c7d0a982a9 100644
--- a/usr/src/cmd/getent/dogetsp.c
+++ b/usr/src/cmd/getent/dogetsp.c
@@ -20,6 +20,7 @@
*/
/*
+ * Copyright (c) 2018 Peter Tribble.
* Copyright (c) 2014 Gary Mills
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
@@ -40,8 +41,6 @@ dogetsp(const char **list)
{
struct spwd *sp;
int rc = EXC_SUCCESS;
- char *ptr;
- uid_t uid;
if (list == NULL || *list == NULL) {