dead code und unbenutzte Variablen entfernt
Change-Id: I18b5d6a8cdf221d3a376541c01e82a1c64f10508
diff --git a/std/shells/magier/fileedit.c b/std/shells/magier/fileedit.c
index b0bfeb0..a242c68 100644
--- a/std/shells/magier/fileedit.c
+++ b/std/shells/magier/fileedit.c
@@ -60,7 +60,7 @@
static int _ed(string cmdline)
{
mixed *args,*args2;
- int flags,i,arg_size;
+ int flags,arg_size;
cmdline=_unparsed_args();
args=parseargs(cmdline,&flags,"",1);
if (flags==-1||!(arg_size=sizeof(args)))
@@ -149,7 +149,6 @@
if (flags&CP_V) printf(FILE_COPIED,source);
return RET_OK;
}
- return 0; // not-reached
}
static void _cp_ask_overwrite2(string input, mixed *filedata,
@@ -290,9 +289,8 @@
static void _cp_ask_copy(mixed *filedata,int move, int flags)
{
- mixed data;
string dest,source;
- int delete_subs,jump;
+ int jump;
if(!sizeof(filedata))
{
@@ -441,7 +439,7 @@
static int _rmdir(string cmdline)
{
- string dest,tmp;
+ string dest;
int flags;
mixed *args;
@@ -492,7 +490,7 @@
static int _mkdir(string cmdline)
{
- string dest,tmp;
+ string dest;
int flags,i;
string *args;
@@ -581,13 +579,10 @@
_rm_ask_delete(filedata,flags);
return;
}
- return;
}
private void _rm_ask_delete(mixed *filedata, int flags)
{
- int i;
- mixed temp;
if (!sizeof(filedata))
{
printf("rm: abgeschlossen.\n");
@@ -600,7 +595,7 @@
_rm_ask_delete(filedata[1..],flags);
return;
case FSIZE_DIR:
- if (i=filedata[0][SUBDIRSIZE])
+ if (filedata[0][SUBDIRSIZE])
printf("Ins Verzeichnis '%s' hinabsteigen?\n",
filedata[0][FULLNAME]);
else
@@ -652,7 +647,7 @@
static int _rm(string cmdline)
{
- mixed *args,*args2;
+ mixed *args;
int flags,i;
string mask;
diff --git a/std/shells/magier/fileview.c b/std/shells/magier/fileview.c
index 6929357..2fc4b2f 100644
--- a/std/shells/magier/fileview.c
+++ b/std/shells/magier/fileview.c
@@ -65,7 +65,6 @@
// und bereitet beides fuer die Nutzung durch terminal_colours() vor.
private void SetColorstrings()
{
- string term = QueryProp(P_TTY);
mapping vars = QueryProp(P_VARIABLES);
// 2nd value in templates is the additional amount of space the templates
// itself needs in addition to the value inserted later in place of %s.
@@ -76,7 +75,7 @@
lstemplates.colormap[0]=ANSI_NORMAL;
// Template fuer die Ausgabe und die Defaults fuer die Farbplatzhalter je
// nach Terminal einstellen.
- switch(term=QueryProp(P_TTY))
+ switch(QueryProp(P_TTY))
{
case "vt100":
lstemplates.templates[DIR] = "%^LS_DIR_START%^%s/%^LS_DIR_END%^";
@@ -153,7 +152,6 @@
private int _ls_maxlen(mixed filedata,int flags,int maxlen)
{
string base;
- int size;
base=filedata[BASENAME];
if (!(flags&LS_A)&&(base[0]=='.')) return 0;
maxlen=max(maxlen,sizeof(base));
@@ -250,7 +248,7 @@
mixed* args;
string output;
mixed *tmp;
- closure output_fun,v_read,v_write,creator,sort_fun;
+ closure v_read,v_write,creator,sort_fun;
cmdline=_unparsed_args()||"";
args=parseargs(cmdline,&flags,LS_OPTS,1);
diff --git a/std/shells/magier/todo.c b/std/shells/magier/todo.c
index c87d17d..f28bd12 100644
--- a/std/shells/magier/todo.c
+++ b/std/shells/magier/todo.c
@@ -12,7 +12,6 @@
#define SAVEFILENAME sprintf("/players/%s/.todoliste",getuid())
-private nosave status todo_initialized;
private nosave mixed *todo_data;
mixed *todo_data_public;
static mixed _query_localcmds()
@@ -23,9 +22,8 @@
private void todo_save()
{
-
- int i,j;
- string a,b;
+ int j;
+ string a;
a=SAVEFILENAME+".o";
rm(a);
if (j=sizeof(todo_data))
diff --git a/std/shells/magier/upd.c b/std/shells/magier/upd.c
index 87a3030..ebee975 100644
--- a/std/shells/magier/upd.c
+++ b/std/shells/magier/upd.c
@@ -65,7 +65,6 @@
if (!obj=find_object(file[0..<3]+(clone?("#"+clone):"")))
{
int pos,pos2;
- string bt;
if(file_size(file)<0)
{
@@ -356,7 +355,7 @@
if ( (!(flags&UPD_LOAD))&&
((obj = find_object(file)) || (flags & (UPD_M|UPD_I))))
{
- object *inv, env, *pl_inv;
+ object *inv, env;
mapping pro;
int i;
mixed configdata;