fixes warnings unreachable code, unused variables
Change-Id: Id84c5233ffd9709272216937be5cfd9b7b118a4a
diff --git a/d/seher/haeuser/bausparvertrag.c b/d/seher/haeuser/bausparvertrag.c
index 743ac4a..783d6d0 100644
--- a/d/seher/haeuser/bausparvertrag.c
+++ b/d/seher/haeuser/bausparvertrag.c
@@ -98,9 +98,9 @@
int Einzahlung()
{
int *al;
- object env, po;
+ object env;
- if (old_explode(object_name(po=previous_object()),"#")[0] != PATH+"sb_einzahlung") {
+ if (old_explode(object_name(previous_object()),"#")[0] != PATH+"sb_einzahlung") {
env = environment();
HLOG( (env ? getuid(env) : "BANK.LOG"), sprintf("Vertrag: Einzahlung von aussen! TI = %O, PO = %O\n", this_interactive(), previous_object()));
}
diff --git a/d/seher/haeuser/moebel/lesepult.c b/d/seher/haeuser/moebel/lesepult.c
index fa1fabb..756dc05 100644
--- a/d/seher/haeuser/moebel/lesepult.c
+++ b/d/seher/haeuser/moebel/lesepult.c
@@ -305,72 +305,72 @@
int take_page(string str)
{
- if (!stringp(str))
- return 0;
- if (present(str,environment()))
- return 0;
- notify_fail(BS(
- "Wo siehst Du denn hier ein Buch ?",78));
- if (!(MQTBMASTER->QueryTagebuchAufPult(this_player()))&&
- strstr(lower_case(str),"buch")!=-1)
- return 0;
- if ((owner!=getuid(this_player()))&&
- strstr(lower_case(str),"buch")!=-1)
- notify_fail(BS(
- "Dies ist nicht Dein Lesepult oder Dein Buch darauf, deshalb l"+
- "aesst Du es vorsichtshalber liegen.",78));
- return 0;
- if ((owner!=getuid(this_player()))&&
- strstr(lower_case(str),"seite")!=-1)
- notify_fail(BS(
- "Die Eigentuemerin oder der Eigentuemer des Lesepults haette s"+
- "icher etwas dagegen, wenn Du das Buch zerstoerst, also laesst"+
- " Du es lieber.",78));
- return 0;
- // Heilung 1x alle 6 Stunden.
- if (this_player()->check_and_update_timed_key(21600,"Ark_Hels_Schwarzes_Buch")==-1)
- {
- object o;
- this_player()->ReceiveMsg(BS(
- "Du reisst erst vorsichtig eine schwarze Seite und dann eine"+
- " weitere aus dem goldenen Buch. Dann ueberfaellt Dich eine "+
- "kleine Schwaeche, die Dich vor weiterem Zerstoeren innehalt"+
- "en laesst. Du solltest Hels Grosszuegigkeit nicht ueberscha"+
- "etzen.",78),MT_FEEL,MA_TAKE);
- tell_room(environment(),BS(
- this_player()->Name(WER)+" reisst zwei Seiten aus dem Buch, "+
- "das auf dem Pult liegt. Dann haelt "+this_player()->QueryPronoun(WER)+""+
- " inne, wahrscheinlich folgt "+this_player()->QueryPronoun(WER)+""+
- " einer klugen Eingebung.",78));
- o=clone_object(OBJ("reg_seite"));
- if (o->move(this_player())!=MOVE_OK)
- {
- o->remove(1);
+ if (!stringp(str) || present(str,environment()))
+ return 0;
+
+ notify_fail(BS(
+ "Wo siehst Du denn hier ein Buch ?",78));
+ if (!(MQTBMASTER->QueryTagebuchAufPult(this_player()))&&
+ strstr(lower_case(str),"buch")!=-1)
+ return 0;
+
+ notify_fail(BS(
+ "Dies ist nicht Dein Lesepult oder Dein Buch darauf, deshalb l"+
+ "aesst Du es vorsichtshalber liegen.",78));
+ if ((owner!=getuid(this_player()))&&
+ strstr(lower_case(str),"buch")!=-1)
+ return 0;
+
+ notify_fail(BS(
+ "Die Eigentuemerin oder der Eigentuemer des Lesepults haette s"+
+ "icher etwas dagegen, wenn Du das Buch zerstoerst, also laesst"+
+ " Du es lieber.",78));
+ if (owner!=getuid(this_player()) && strstr(str,"seite")!=-1)
+ return 0;
+
+ // Heilung 1x alle 6 Stunden.
+ if (this_player()->check_and_update_timed_key(21600,
+ "Ark_Hels_Schwarzes_Buch")==-1) {
this_player()->ReceiveMsg(BS(
- "Du kannst die erste Seite nicht mehr tragen, sie loest sic"+
- "h einfach auf.",78),MT_MAGIC,MA_REMOVE);
- }
- // Die erste Seite behandelt, hier, falls man auch die zweite
- // Seite nicht tragen kann oder mit der ersten am Limit ist.
- o=clone_object(OBJ("reg_seite"));
- if (o->move(this_player())!=MOVE_OK)
- {
- o->remove(1);
- this_player()->ReceiveMsg(BS(
- "Du kannst die zweite Seite nicht mehr tragen, sie loest si"+
- "ch einfach auf.",78),MT_MAGIC,MA_REMOVE);
- }
- return 1;
+ "Du reisst erst vorsichtig eine schwarze Seite und dann eine"+
+ " weitere aus dem goldenen Buch. Dann ueberfaellt Dich eine "+
+ "kleine Schwaeche, die Dich vor weiterem Zerstoeren innehalt"+
+ "en laesst. Du solltest Hels Grosszuegigkeit nicht ueberscha"+
+ "etzen.",78),MT_FEEL,MA_TAKE);
+ tell_room(environment(),BS(
+ this_player()->Name(WER)+" reisst zwei Seiten aus dem Buch, "+
+ "das auf dem Pult liegt. Dann haelt "+this_player()->QueryPronoun(WER)+
+ " inne, wahrscheinlich folgt "+this_player()->QueryPronoun(WER)+
+ " einer klugen Eingebung.",78));
+ object o = clone_object(OBJ("reg_seite"));
+ if (o->move(this_player())!=MOVE_OK)
+ {
+ o->remove(1);
+ this_player()->ReceiveMsg(BS(
+ "Du kannst die erste Seite nicht mehr tragen, sie loest sic"+
+ "h einfach auf.",78),MT_MAGIC,MA_REMOVE);
+ }
+ // Die erste Seite behandelt, hier, falls man auch die zweite
+ // Seite nicht tragen kann oder mit der ersten am Limit ist.
+ o=clone_object(OBJ("reg_seite"));
+ if (o->move(this_player())!=MOVE_OK)
+ {
+ o->remove(1);
+ this_player()->ReceiveMsg(BS(
+ "Du kannst die zweite Seite nicht mehr tragen, sie loest si"+
+ "ch einfach auf.",78),MT_MAGIC,MA_REMOVE);
+ }
+ return 1;
}
- this_player()->ReceiveMsg(BS(
- "Vergeblich reisst Du mehr oder weniger vorsichtig an einigen"+
- " schwarzen Seiten im Buch herum, doch sie bleiben stoerrisch"+
- ". Es wird wohl ein wenig dauern, bis Du das wieder versuchen"+
- " kannst.",78),MT_MAGIC,MA_USE);
- tell_room(environment(),BS(
- this_player()->Name(WER)+" reisst im Buch auf dem Lesepult he"+
- "rum.",78),({this_player()}));
- return 1;
+ this_player()->ReceiveMsg(BS(
+ "Vergeblich reisst Du mehr oder weniger vorsichtig an einigen"+
+ " schwarzen Seiten im Buch herum, doch sie bleiben stoerrisch"+
+ ". Es wird wohl ein wenig dauern, bis Du das wieder versuchen"+
+ " kannst.",78),MT_MAGIC,MA_USE);
+ tell_room(environment(),BS(
+ this_player()->Name(WER)+" reisst im Buch auf dem Lesepult he"+
+ "rum.",78),({this_player()}));
+ return 1;
}
int cmd_lesen(string str)
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);
diff --git a/secure/udp/www.news.c b/secure/udp/www.news.c
index c0f1d17..24eddde 100644
--- a/secure/udp/www.news.c
+++ b/secure/udp/www.news.c
@@ -57,7 +57,7 @@
private mixed tinfo(mixed article)
{
- mixed tmp, info;
+ mixed tmp;
string rn, rt, rg, tid;
int j, k;