fixes warnings unreachable code, unused variables
Change-Id: Id84c5233ffd9709272216937be5cfd9b7b118a4a
diff --git a/obj/mpa.c b/obj/mpa.c
index 3c2dd4f..26283a2 100644
--- a/obj/mpa.c
+++ b/obj/mpa.c
@@ -294,8 +294,8 @@
// Achtung: Wenn flag&M2S_REMOTE, muss msg int sein
// group: Name der Rubrik, wenn nicht aktuelle Rubrik. Nur bei M2S_REMOTE
- string txt,hs,s,*m,s2;
- int i,hi,thisnr,ansiflag;
+ string txt,hs,s,*m;
+ int hi,thisnr,ansiflag;
if (flag&M2S_REMOTE) txt="Rubrik: "+(group?group:GROUP)+", Artikel: "+
(intp(msg)?to_string(msg+1):"???")+" von "+sizeof(messages)+"\n";
@@ -346,7 +346,6 @@
static varargs lies(mixed str) {
mixed num;
mixed *messages;
- int tid;
if (str=="?"||str=="-?") return
write("Syntax: lies <nr>\n"
@@ -423,9 +422,7 @@
static rubrik(str)
{
- mixed *gruppen;
mixed news;
- int anz,i;
if (str=="?"||str=="-?") return
write("Syntax: rubrik <rubrik>\n"
@@ -489,7 +486,6 @@
static int rubriken(mixed arg)
{
mixed *gruppen, *messages;
- mixed news;
int anz,i,lasttime,timeout,foundone;
string s;
@@ -1013,14 +1009,11 @@
case -3: write(text4minus3+"\n"); return 0;
default: write("Interner Fehler "+err+", Erzmagier verstaendigen!\n"); return 0;
}
- return 0;
}
static varargs int schreib(string str,string pretext,int called_by_itself,
string statuslines)
{
- int err;
-
if (str=="?"||str=="-?") {
write("Syntax: schreib <Titel>\n"
" beginnt einen neuen Artikel in der Zeitung.\n");
@@ -1056,7 +1049,7 @@
}
static varargs Reply(string str,string newtitle) {
- mixed dummy,replytitle,s;
+ mixed dummy,replytitle;
int nr;
if ((dummy=(str||newtitle))=="?"||dummy=="-?") {
@@ -1149,7 +1142,6 @@
}
static PostNote(text) {
- int err;
string sig;
if (!text) {
@@ -1192,7 +1184,7 @@
//static // allowing aliasing *Rumata* 5/8/96
inhalt(str) {
int i,endflag,timeout;
- string *gruppen,s,txt,suche;
+ string s,txt,suche;
mixed messages;
if (str=="?"||str=="-?") return
@@ -1299,7 +1291,6 @@
default: write("Interner Fehler. Bitte Erzmagier verstaendigen !\n");
return 1;
}
- return 0;
}
// Low-level Funktion zum Abonnieren/Abbestellen von Rubriken
@@ -1330,7 +1321,6 @@
}
static Unsubscribe(str) {
- int timeout;
if (str=="?"||str=="-?") return
write("Syntax: unsubscribe <rubrik>"
" oder: bestelle <rubrik> ab\n"),1;
@@ -1355,7 +1345,6 @@
}
static Subscribe(str) {
- int timeout;
if (str=="?"||str=="-?") return
write("Syntax: abonniere <rubrik>\n"
" oder: subscribe <rubrik>\n"),1;
@@ -1397,7 +1386,7 @@
}
static MoveMessage(str) {
- int num,i;
+ int num;
mixed msg/*,expl*/;
string gr;
if (str=="?"||str=="-?") return
@@ -1578,9 +1567,8 @@
}
int GetTID(mixed message) {
- string dummy;
int tid;
- return (sscanf(message[M_MESSAGE],"%s" STATUSESCAPE " tid=%d",dummy,tid)==2)
+ return (sscanf(message[M_MESSAGE],"%~s" STATUSESCAPE " tid=%d",tid)==2)
? tid : message[M_TIME];
}
diff --git a/obj/tools/lupe.c b/obj/tools/lupe.c
index 58f6dca..e91a8ac 100644
--- a/obj/tools/lupe.c
+++ b/obj/tools/lupe.c
@@ -149,7 +149,6 @@
void _load_profile()
{
- object profile;
string pfile;
if (geteuid() && environment() && geteuid(environment())==geteuid() &&
@@ -161,8 +160,6 @@
varargs void init(object origin)
{
- int i,ch;
-
::init(origin);
if (environment()!=this_player()) return;
// if (!IS_LEARNER(this_player())) return;
@@ -249,10 +246,9 @@
string getarg(string args)
{
string arg;
- string rest;
- if (sscanf(args,"\"%s\"%s",arg,rest)==2 ||
- sscanf(args,"\'%s\'%s",arg,rest)==2 ||
- sscanf(args,"|%s|%s",arg,rest)==2)
+ if (sscanf(args,"\"%s\"%~s",arg)==2 ||
+ sscanf(args,"\'%s\'%~s",arg)==2 ||
+ sscanf(args,"|%s|%~s",arg)==2)
{
if (arg=="")
arglen=2;
@@ -260,13 +256,13 @@
arglen=sizeof(arg)+2;
return arg;
}
- if (sscanf(args,"%s %s",arg,rest)==2)
+ if (sscanf(args,"%s %~s",arg)==2)
args=arg;
- if (sscanf(args,"%s.%s",arg,rest)==2)
+ if (sscanf(args,"%s.%~s",arg)==2)
args=arg;
- if (sscanf(args,"%s[%s",arg,rest)==2)
+ if (sscanf(args,"%s[%~s",arg)==2)
args=arg;
- if (sscanf(args,"%s]%s",arg,rest)==2)
+ if (sscanf(args,"%s]%~s",arg)==2)
args=arg;
if (args=="")
arglen=0;
@@ -326,7 +322,7 @@
int eval(string str)
{
- int i,flag,old_sp,first;
+ int i,flag,first;
mixed *old_stack;
string arg,tmp;
err=0;
@@ -658,7 +654,6 @@
string over(string arg)
{
- object ob;
if (sizeof(stack)<2)
{
err="stack underflow";
@@ -708,7 +703,7 @@
{
string str,line,res;
mixed tmp;
- int i,j;
+ int i;
str=rec_desc(arr);
if (sizeof(str)<=MAXLINELEN-4)
return "--> "+str+"\n";
@@ -780,12 +775,11 @@
string dump(string arg)
{
object ob;
- string s;
ob=pop();
if (err) return arg;
push(ob);
write("FILENAME: "+object_name(ob)+" ");
- if (!hide_short && (({string})s=ob->short()))
+ if (!hide_short && (({string})ob->short()))
write(" SHORT: "+({string})ob->name());
write("\n");
return arg;
@@ -914,7 +908,7 @@
string call(string arg)
{
string func,args;
- int temp,i;
+ int temp;
string rest,tmp;
object ob;
@@ -925,7 +919,7 @@
args=getrest(arg);
if (err) return args;
argv=({});
- i=0;
+
while (1)
{
args=strip(args);
@@ -1199,7 +1193,7 @@
{
mixed *calls,ret;
string tmp;
- int i,j;
+ int i;
calls=call_out_info();
ret=({});
@@ -1237,7 +1231,7 @@
string make(string arg)
{
object *list, ob, env;
- string file,temp,dummy;
+ string file,temp;
int i,cloned;
ob=pop();
@@ -1250,7 +1244,7 @@
env=environment(ob);
file=object_name(ob);
write("Updating "+object_name(ob)+"...\n");
- if (sscanf(file,"%s#%s",temp,dummy)==2)
+ if (sscanf(file,"%s#%~s",temp)==2)
{
file=temp;
cloned=1;
@@ -1362,8 +1356,6 @@
mixed rusage(string arg)
{
- mixed *resusage;
- int i,j;
/*
resusage=({mixed *})efun::rusage();
for (i=0;i<18;i++){
@@ -1389,7 +1381,8 @@
static string swho(string arg)
{
- object *userlist, snooper, found;mixed active;
+ object *userlist, snooper;
+ mixed active;
int i,j,done;
if (geteuid(this_interactive())!=geteuid()) return arg;
@@ -1475,7 +1468,6 @@
string stat(string arg)
{
object ob;
- mapping quests;
mixed stats, arr, tmp,tmp2, list;
string titel, level, stat_str,weapon,armour;
int pl;
@@ -1871,7 +1863,6 @@
mixed copy_ldfied(string arg)
{
object ob, new;
- mapping props;
ob=pop();
if (!ob)
@@ -1882,7 +1873,6 @@
return arg;
}
new=clone_object(old_explode(object_name(ob),"#")[0]);
- props=({mapping})ob->QueryProperties();
({mapping})new->SetProperties(ob->QueryProperties());
push(new);
({int})new->move(this_player(),M_NOCHECK);