ofm-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ofm-developer] Questions to different things of ofm


From: Marcus vA
Subject: [Ofm-developer] Questions to different things of ofm
Date: Tue, 24 Sep 2002 23:25:57 +0200

Hello,

some questions:

Before all: I compiled all on FreeBSD 4.7RC1 with FreeBSD's builtin
curses.

While compilation with CFLAGS= -pedantic -s -Wall several warnings
occured, at which I took a closer look. Some questions appeared:

in fildir.c:45 
if (a->dir && b->dir) strcasecmp(a->name,b->name);
The statement does not have any funcionality, has it? Maybe there is a
return missing.

fildir.c/h: Function int dirFree(DirStruct *dst)

Shouldn't that be void dirFree(DirStruct *dst)?
It frees dst but does not return anything, although a int should be
returned.

fildir.c/h: Function int dirProcess()

fildir.c:351 an empty return.
Shouldn't that be 0? An empty return could return anything, if the
function has a returnvalue, so the behaviour is undefined, isn't it?

in dialogs.c:106ff.

bar[3] should be an int or the values should be converted to a char, or?

in dialogs.c:209:
  if (bpos==bvsize) sprintf(bfirstchar+bpos,"\0");

Isn't it better to use sprintf(bfirstchar+bpos,""); here? An ending ist
autoamtically set, I guess, if the string is empty.

in iface.c: an empty return in line 194, see above.

in iface.c:224
  while (tmp=chdir(".."));

is there a ; too much? Should that be 
while (tmp=chdir("..")) p->reread=1; ?

Or just an endless loop?


in iface.c:351 

sprintf(tstr,"%-*.*s",t,t,ds->name);

What does the sprintf do? I did not see such a "%-*.*s" before.

same in iface.c:354

in iface.c/h: int writeinfo(int mode) should be void, see above.


Thanks for information to those things.

Regards
Marcus

---
Mr. Cole's Axiom:
The sum of the intelligence on the planet is a constant; the
population is growing.

Attachment: pgppC3SUN1gGT.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]