Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sushi Remove an effectively unused variable.
details: https://anonhg.NetBSD.org/src/rev/dbbe44a3d6e7
branches: trunk
changeset: 581518:dbbe44a3d6e7
user: lukem <lukem%NetBSD.org@localhost>
date: Thu Jun 02 09:41:12 2005 +0000
description:
Remove an effectively unused variable.
Appease gcc -Wuninitialized.
diffstat:
usr.sbin/sushi/handlers.c | 4 +++-
usr.sbin/sushi/scanform.c | 11 +++++------
usr.sbin/sushi/sushi.c | 4 ++--
3 files changed, 10 insertions(+), 9 deletions(-)
diffs (98 lines):
diff -r d5464de5cb6b -r dbbe44a3d6e7 usr.sbin/sushi/handlers.c
--- a/usr.sbin/sushi/handlers.c Thu Jun 02 09:32:57 2005 +0000
+++ b/usr.sbin/sushi/handlers.c Thu Jun 02 09:41:12 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: handlers.c,v 1.7 2005/01/12 17:38:40 peter Exp $ */
+/* $NetBSD: handlers.c,v 1.8 2005/06/02 09:41:12 lukem Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -82,6 +82,7 @@
char *exec, *p;
size_t len;
+ i = 0;
f = fopen(path, "r");
for (lcnt = 1; (exec = fgetln(f, &len)) != NULL; ++lcnt) {
if (len == 1) /* skip blank */
@@ -117,6 +118,7 @@
char *exec, *p, *arg;
size_t len;
+ p = arg = NULL;
f = fopen(path, "r");
for (lcnt = 1; (exec = fgetln(f, &len)) != NULL; ++lcnt) {
if (len == 1) /* skip blank */
diff -r d5464de5cb6b -r dbbe44a3d6e7 usr.sbin/sushi/scanform.c
--- a/usr.sbin/sushi/scanform.c Thu Jun 02 09:32:57 2005 +0000
+++ b/usr.sbin/sushi/scanform.c Thu Jun 02 09:41:12 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scanform.c,v 1.43 2005/01/12 17:38:40 peter Exp $ */
+/* $NetBSD: scanform.c,v 1.44 2005/06/02 09:41:12 lukem Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
char *t = row;
char *x;
char desc[80];
- int type;
+ int type = 0;
int req = 0;
while (*++t && !isspace((unsigned char)*t))
@@ -863,6 +863,8 @@
if (strcmp("pre", form_userptr(form)) == 0)
return (process_preform(form, path));
+ t = NULL;
+ i = 0;
curs_set(0);
*msg = catgets(catalog, 3, 17, "Are you sure? (Y/n)");
label = newCDKLabel(cdkscreen, CENTER, CENTER, msg, 1, TRUE, FALSE);
@@ -1207,7 +1209,7 @@
static char *
gen_escript(FTREE_ENTRY *ftp, char *dir, int max, char **args)
{
- char *p, *q, *qo, *po, *test, *comm, *n;
+ char *p, *q, *po, *test, *comm, *n;
FILE *file;
char buf[PATH_MAX+30];
size_t len;
@@ -1218,8 +1220,6 @@
if (ftp->data == NULL)
bailout(catgets(catalog, 1, 22,
"Null filename in escript argument"));
- else
- qo = q = strdup(ftp->data);
l = strlen(q) + 2;
comm = malloc(sizeof(char) * l);
@@ -1257,7 +1257,6 @@
}
}
- free(qo);
if (po != NULL)
free(po);
diff -r d5464de5cb6b -r dbbe44a3d6e7 usr.sbin/sushi/sushi.c
--- a/usr.sbin/sushi/sushi.c Thu Jun 02 09:32:57 2005 +0000
+++ b/usr.sbin/sushi/sushi.c Thu Jun 02 09:41:12 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sushi.c,v 1.24 2005/01/12 17:53:45 peter Exp $ */
+/* $NetBSD: sushi.c,v 1.25 2005/06/02 09:41:12 lukem Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -178,9 +178,9 @@
char **n;
searchpaths = NULL;
+ i = 0;
if ((conf = fopen("/etc/sushi.conf", "r")) != NULL) {
- i = 0;
while ((p = fgetln(conf, &len)) != NULL) {
if (len == 1 || p[len - 1] == '#' || p[len - 1] != '\n')
continue;
Home |
Main Index |
Thread Index |
Old Index