summaryrefslogtreecommitdiffstats
path: root/usr.bin/chpass
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>1998-12-06 22:58:23 +0000
committerarchie <archie@FreeBSD.org>1998-12-06 22:58:23 +0000
commit167c036e91fb24a62d627d16a2f3afa6d875c9e2 (patch)
treee40a696092a51458b052ff258b3700d51fc2ca09 /usr.bin/chpass
parent3f56407712318be6faa0b98ad8db4b5a83ef4c93 (diff)
downloadFreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.zip
FreeBSD-src-167c036e91fb24a62d627d16a2f3afa6d875c9e2.tar.gz
Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).
Diffstat (limited to 'usr.bin/chpass')
-rw-r--r--usr.bin/chpass/Makefile1
-rw-r--r--usr.bin/chpass/chpass.c12
-rw-r--r--usr.bin/chpass/edit.c4
-rw-r--r--usr.bin/chpass/field.c2
-rw-r--r--usr.bin/chpass/table.c2
5 files changed, 11 insertions, 10 deletions
diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile
index f19a257..3abed82 100644
--- a/usr.bin/chpass/Makefile
+++ b/usr.bin/chpass/Makefile
@@ -1,6 +1,7 @@
# @(#)Makefile 8.2 (Berkeley) 4/2/94
PROG= chpass
+CFLAGS+=-Wall
SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
table.c util.c ypxfr_misc.c ${GENSRCS}
GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \
diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c
index 982548f..2809f8b 100644
--- a/usr.bin/chpass/chpass.c
+++ b/usr.bin/chpass/chpass.c
@@ -32,15 +32,15 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1988, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94";
-static char rcsid[] =
- "$Id: chpass.c,v 1.13 1997/02/22 19:54:25 peter Exp $";
+static const char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94";
+static const char rcsid[] =
+ "$Id: chpass.c,v 1.14 1997/03/29 04:28:38 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -83,10 +83,10 @@ main(argc, argv)
char **argv;
{
enum { NEWSH, LOADENTRY, EDITENTRY, NEWPW, NEWEXP } op;
- struct passwd *pw, lpw;
+ struct passwd *pw = NULL, lpw;
char *username = NULL;
int ch, pfd, tfd;
- char *arg;
+ char *arg = NULL;
#ifdef YP
int force_local = 0;
int force_yp = 0;
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c
index 68dbc0e..9cae42e 100644
--- a/usr.bin/chpass/edit.c
+++ b/usr.bin/chpass/edit.c
@@ -30,11 +30,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: edit.c,v 1.10 1997/06/25 06:59:55 charnier Exp $
+ * $Id: edit.c,v 1.11 1998/08/14 03:18:32 thepish Exp $
*/
#ifndef lint
-static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
+static const char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/param.h>
diff --git a/usr.bin/chpass/field.c b/usr.bin/chpass/field.c
index 73fa479..997d21f 100644
--- a/usr.bin/chpass/field.c
+++ b/usr.bin/chpass/field.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94";
+static const char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/param.h>
diff --git a/usr.bin/chpass/table.c b/usr.bin/chpass/table.c
index eed097e..1bc857b 100644
--- a/usr.bin/chpass/table.c
+++ b/usr.bin/chpass/table.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94";
+static const char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/types.h>
OpenPOWER on IntegriCloud