Page 1 of 1

levellimit-1.1 fails to compile.

Posted: Sun Mar 06, 2005 5:25 pm
by dotslasher
link: http://unrealircd.com/index.php?page=mo ... dule&id=48

Fails to compile on my Unreal3.2.2, Shell: freebsd

Code: Select all

gcc -I../include -I/home/xtech/Unreal3.2/extras/regexp/include -pipe -g -O2 -funsigned-char -DZIP_LINKS -export-dynamic   -fPIC -DPIC -shared  -DDYNAMIC_LINKING  -o levellimit.so levellimit.c
levellimit.c: In function `levelToMode':
levellimit.c:205: `mustHaveMode' undeclared (first use in this function)
levellimit.c:205: (Each undeclared identifier is reported only once
levellimit.c:205: for each function it appears in.)
*** Error code 1

Stop in /home/xtech/Unreal3.2/src/modules.
*** Error code 1

Stop in /home/xtech/Unreal3.2/src.
*** Error code 1

Stop in /home/xtech/Unreal3.2.

Posted: Mon Mar 07, 2005 3:59 am
by w00t
Try updating to 1.1, the latest.

Posted: Mon Mar 07, 2005 4:09 am
by Syzop
It seems 1.1 has this error.
Mail codemastr? :P

Posted: Tue Mar 08, 2005 12:53 am
by dotslasher
its version 1.1 but the filename says 1.0 ;)

and i'll try :D

Posted: Tue Mar 08, 2005 1:20 am
by DeadNotBuried
this may or may not work but you could try it if you wanted to (no i haven't tested it)

at line 200
you could try changing
int levelToMode(char level)
{
switch (level)
{
case 'o':
mustHaveMode |= UMODE_OPER;

to
int levelToMode(char level)
{
int mustHaveMode;
switch (level)
{
case 'o':
mustHaveMode |= UMODE_OPER;

it should at least compile ok then, even if this does work grab any fix codemastr puts out though.

Posted: Tue Mar 08, 2005 1:27 am
by codemastr
Yes, that fix is correct. I wonder how the hell it compiled/ran in my test! Without the variable, it definately shouldn't have compiled... I'll get a fix out tomorrow.