Jump to content
Eternal Lands Official Forums
Beaverhunter

Current CVS errors

Recommended Posts

build fails without _EXTRA_SOUND_DEBUG:

 

sound.c: In function `update_sound':

sound.c:3096: error: `l' undeclared (first use in this function)

sound.c:3096: error: (Each undeclared identifier is reported only once

sound.c:3096: error: for each function it appears in.)

 

fix: declare l outside of _EXTRA_SOUND_DEBUG

 

EDIT: cvs was faster :D

Edited by Alberich

Share this post


Link to post
Share on other sites
build fails without _EXTRA_SOUND_DEBUG:

Oops. Sorry. I was sure I checked that. ><

Share this post


Link to post
Share on other sites

I built the CVS client for the mac and can not figure out how to get 2 errors fixed.

 

I followed all the instructions for building the client from CVS but have two errors I do not know ho to fix:

 

Line Location Tool:0: "_CHECK_GL_ERRORS", referenced from:

Line Location Tool:0: _enable_reflection_clip_planes in frustum.o

Line Location Tool:0: _disable_reflection_clip_planes in frustum.o

Line Location Tool:0: "ec::StaffEffect::StaffEffect(ec::EyeCandy*, bool*, ec::Vec3*, ec::StaffEffect::StaffType, unsigned short)", referenced from:

Line Location Tool:0: _ec_create_staff_of_protection in eye_candy_wrapper.o

Line Location Tool:0: _ec_create_staff_of_the_mage in eye_candy_wrapper.o

Line Location Tool:0: symbol(s) not found

Line Location Tool:0: collect2: ld returned 1 exit status

 

I made the changes that bluap suggested and did a fresh checkout as florian suggested but still get essentially the same 2 ld errors:

Line Location Tool:0: collect2: ld returned 1 exit status

 

Line Location Tool:0: "_CHECK_GL_ERRORS", referenced from:Line Location Tool:0: symbol(s) not found

Line Location Tool:0: _enable_reflection_clip_planes in frustum.o

Line Location Tool:0Line Location Tool:0: _disable_reflection_clip_planes in frustum.o

: "ec::StaffEffect::StaffEffect(ec::EyeCandy*, bool*, ec::Vec3*, ec::StaffEffect::StaffType, unsigned short)", referenced from:

 

Line Location Tool:0: _ec_create_staff_of_the_mage in eye_candy_wrapper.o

Line Location Tool:0: _ec_create_staff_of_protection in eye_candy_wrapper.o

 

I guess some files are missing?

Edited by rmiles

Share this post


Link to post
Share on other sites
I built the CVS client for the mac and can not figure out how to get 2 errors fixed.

Do you have OPENGL_TRACE enabled in make.conf/make.defaults or the mac build equivalent?

Share this post


Link to post
Share on other sites
Line Location Tool:0: "_CHECK_GL_ERRORS", referenced from:

Line Location Tool:0: _enable_reflection_clip_planes in frustum.o

Line Location Tool:0: _disable_reflection_clip_planes in frustum.o

No idea why that happens.

Line Location Tool:0: "ec::StaffEffect::StaffEffect(ec::EyeCandy*, bool*, ec::Vec3*, ec::StaffEffect::StaffType, unsigned short)", referenced from:

Line Location Tool:0: _ec_create_staff_of_protection in eye_candy_wrapper.o

Line Location Tool:0: _ec_create_staff_of_the_mage in eye_candy_wrapper.o

Looks like you're missing files here.

A clean cvs checkout might help.

Share this post


Link to post
Share on other sites

eye_candy/effect_staff.cpp is quite new. Maybe the OSX makefile has not been updated yet. (Checked, is has not). Add eye_candy/effect_staff.o to the CXXOBJS list in Makefile.osx

 

And to fix the CHECK_GL_ERRORS make sure OPENGL_TRACE is not defined. Comment out the line in make.conf which mentions OPENGL_TRACE.

Share this post


Link to post
Share on other sites
eye_candy/effect_staff.cpp is quite new. Maybe the OSX makefile has not been updated yet. (Checked, is has not). Add eye_candy/effect_staff.o to the CXXOBJS list in Makefile.osx

 

And to fix the CHECK_GL_ERRORS make sure OPENGL_TRACE is not defined. Comment out the line in make.conf which mentions OPENGL_TRACE.

 

I made these changes with the exception of make.conf. I do not have the file?

The build was as before, showing the same 2 errors.

Share this post


Link to post
Share on other sites

Following warnings ands errors from mac build:

Line Location elconfig.c:827: warning: passing argument 2 of 'glGetIntegerv' from incompatible pointer type

Line Location elpathwrapper.c:56: warning: unknown escape sequence: '\040'

Line Location elpathwrapper.c:56: warning: unknown escape sequence: '\040'

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location glext.h:40: warning: this is the location of the previous definition

Line Location lights.c:115: warning: passing argument 2 of 'glGetIntegerv' from incompatible pointer type

Line Location lights.c:117: warning: passing argument 6 of 'gluProject' from incompatible pointer type

Line Location misc.c:438: warning: passing argument 2 of 'glGetIntegerv' from incompatible pointer type

Line Location paste.c:73: warning: pointer targets in passing argument 1 of 'do_paste' differ in signedness

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location platform.h:77: warning: "APIENTRYP" redefined

Line Location shader.c:69: warning: passing argument 4 of 'ELglShaderSourceARB' from incompatible pointer type

Line Location shader.c:230: warning: passing argument 2 of 'ELglDeleteProgramsARB' from incompatible pointer type

Line Location shader.c:248: warning: passing argument 2 of 'ELglDeleteProgramsARB' from incompatible pointer type

Line Location shader.c:277: warning: passing argument 2 of 'ELglDeleteProgramsARB' from incompatible pointer type

Line Location Tool:0: Command /Developer/usr/bin/g++-4.0 failed with exit code 1

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/cal.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/buddy.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/books.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/cal3d_wrapper.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/chat.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/bbox_tree.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/bags.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/fontdef.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/parser.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/astrology.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/cache.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/SDLmain.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/symbols.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/alphamap.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/actors.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/typesetter.o, file is not of required architecture

Line Location Tool:0: duplicate symbol .objc_category_name_NSString_ReplaceSubString in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/i386/SDLmain-22FAE83A.o and /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/i386/SDLmain-22FAE83A.o

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/actor_scripts.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/3d_objects.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/2d_objects.o, file is not of required architecture

Line Location Tool:0: warning in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/asc.o, file is not of required architecture

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

Line Location vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

ld: duplicate symbol .objc_category_name_NSString_ReplaceSubString in /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/i386/SDLmain-22FAE83A.o and /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/i386/SDLmain-22FAE83A.o

collect2: ld returned 1 exit status

cd /Users/rmiles/elc/macosx

/Developer/usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -DCLUSTER_INSIDES -DCUSTOM_LOOK -DCUSTOM_UPDATE -DELC -DFUZZY_PATHS -DNEW_SELECTION -DNEW_SOUND -DNEW_TEX -DOPENGL_TRACE -DOSX -DPNG_SCREENSHOT -DSIMPLE_LOD -DUSE_INLINE -DUSE_SHADER -DVERTEX_PROGRAM_ACTOR_ANIMATION_DEBUG -DZLIB -fmessage-length=0 -mtune=G5 -mfix-and-continue -mmacosx-version-min=10.4 -gdwarf-2 -I/Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/EternalLands.hmap -F/Users/rmiles/elc/macosx/build/Debug -F/Users/rmiles/Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks -F/Users/rmiles/elc/macosx/../../../../Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Users/rmiles/elc/macosx/../../../../Library/Frameworks -F/Users/rmiles/elc/macosx/../../../../Library/Frameworks -F/Users/rmiles/elc/macosx/../../../../Library/Frameworks -I/Users/rmiles/elc/macosx/build/Debug/include -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/libxml2 -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Users/rmiles/Library/Frameworks/SDL.framework/Headers -I/Users/rmiles/Library/Frameworks/SDL_net.framework/Headers -I/Users/rmiles/Library/Frameworks/SDL_image.framework/Headers -I/Users/rmiles/Library/Frameworks/OpenAL.framework/Headers -I/Users/rmiles/Library/Frameworks/Ogg.framework/Headers -I/Users/rmiles/Library/Frameworks/Vorbis.framework/Headers -I/Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c /Users/rmiles/elc/macosx/../console.c -o /Users/rmiles/elc/macosx/build/EternalLands.build/Debug/EternalLands.build/Objects-normal/ppc/console-69476124.o

In file included from /Users/rmiles/elc/macosx/../text.h:11,

from /Users/rmiles/elc/macosx/../console.h:9,

from /Users/rmiles/elc/macosx/../console.c:5:

/Users/rmiles/elc/macosx/../platform.h:77:1: warning: "APIENTRYP" redefined

In file included from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:65,

from /Users/rmiles/elc/macosx/../platform.h:72,

from /Users/rmiles/elc/macosx/../text.h:11,

from /Users/rmiles/elc/macosx/../console.h:9,

from /Users/rmiles/elc/macosx/../console.c:5:

/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:40:1: warning: this is the location of the previous definition

/Users/rmiles/Library/Frameworks/vorbis.framework/Headers/vorbisfile.h:65: warning: 'OV_CALLBACKS_DEFAULT' defined but not used

/Users/rmiles/Library/Frameworks/vorbis.framework/Headers/vorbisfile.h:72: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used

/Users/rmiles/Library/Frameworks/vorbis.framework/Headers/vorbisfile.h:79: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used

/Users/rmiles/Library/Frameworks/vorbis.framework/Headers/vorbisfile.h:86: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

from /Users/rmiles/elc/macosx/../console.c:5:

from /Users/rmiles/elc/macosx/../console.h:9,

In file included from /Users/rmiles/elc/macosx/../text.h:11,

Edited by rmiles

Share this post


Link to post
Share on other sites

weather.c refuses to compile without NEW_SOUND:

 

698 sound_on not declared

700 rain_sound not declared

714 expected epression before } token

719 implicit declaration of stop_sound

Share this post


Link to post
Share on other sites

I just stumbled over two small issues with the old minimap

 

Number one is a crash because pf_dst_tile happend to be NULL. I'm not sure if this happend to anyone else or if this happend to me in the debugger, but the check does not hurt at least.

 

The second was introduced with the context menus. Clicking the title bar send a click message to the click handler with negative y-coordinates now and the click handler did not check this case so a mapwalk is initiated whenever I click the minimap titlebar.

 

diff --git a/minimap.c b/minimap.c
index 161cdd9..d42f7ce 100644
--- a/minimap.c
+++ b/minimap.c
@@ -260,7 +260,7 @@ static __inline__ void draw_actor_points(float zoom_multip, float px, float py)

 glEnd();//GL_POINTS

-	if (pf_follow_path)
+	if (pf_follow_path && pf_dst_tile)
 {
	 x = pf_dst_tile->x * size_x;
	 y = float_minimap_size - (pf_dst_tile->y * size_y);
@@ -780,7 +780,7 @@ int click_minimap_handler(window_info * win, int mx, int my, Uint32 flags){
 }
 if(!flags & ELW_LEFT_MOUSE){
	 return 0;
-	} else if (my < win->len_y && mx > 0 && mx < win->len_x-ELW_BOX_SIZE) {
+	} else if (my >= 0 && my < win->len_y && mx >= 0 && mx < win->len_x-ELW_BOX_SIZE) {
	 return minimap_walkto(mx, win->len_y - my);
 } else if(mx < win->len_x-ELW_BOX_SIZE || mx > win->len_x){
	 return 0;

Edited by ago

Share this post


Link to post
Share on other sites
I just stumbled over two small issues with the old minimap

The old minimap will probably get removed soon but I've commited this to CVS anyway, thanks ago.

Share this post


Link to post
Share on other sites

CC stats.o

stats.c: In function ‘get_partial_stat’:

stats.c:341: warning: ISO C90 forbids mixed declarations and code

CC translate.o

CC update.o

CC sky.o

CXX cal3d_wrapper.o

CXX actor_init.o

actor_init.cpp: In function ‘void build_buffers(actor_types*)’:

actor_init.cpp:979: warning: comparison between signed and unsigned integer expressions

 

I was compiling after cvs update.

Share this post


Link to post
Share on other sites
stats.c: In function ‘get_partial_stat’:

stats.c:341: warning: ISO C90 forbids mixed declarations and code

...

actor_init.cpp: In function ‘void build_buffers(actor_types*)’:

actor_init.cpp:979: warning: comparison between signed and unsigned integer expressions

Fixed. At last I think in the case of the second warning. My compiler (gcc 4.3.1) was already happy! Thanks.

Share this post


Link to post
Share on other sites

That did it. I recompiled w/ no errors.

Share this post


Link to post
Share on other sites

Crash when trying to open the minimap (alt-m)

 

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xffffff46
0x90002f26 in szone_malloc ()
(gdb) bt full
#0  0x90002f26 in szone_malloc ()
No symbol table info available.
#1  0x90002b0f in malloc ()
No symbol table info available.
#2  0x067aac66 in gldLoadCurrentTexture ()
No symbol table info available.
#3  0x0678ad52 in gldUpdateDispatch ()
No symbol table info available.
#4  0x12f01ae0 in gleSwitchToRenderer ()
No symbol table info available.
#5  0x12e2f1b4 in gleUpdateDispatchCodeChange ()
No symbol table info available.
#6  0x12e4d806 in glClear_Exec ()
No symbol table info available.
#7  0x92b2705a in glClear ()
No symbol table info available.
#8  0x000514c5 in draw_scene () at draw_scene.c:129
	__FUNCTION__ = "draw_scene"
#9  0x000a984f in start_rendering () at main.c:195
	event = {
 type = 3 '\003', 
 active = {
type = 3 '\003', 
gain = 0 '\000', 
state = 0 '\000'
 }, 
 key = {
...

 

1.7 Windows data files, no compressed files.

Share this post


Link to post
Share on other sites

Possible off-by-one error in ignore.c. The player name is copied to an array[17] and the loop exist in worst case with i==17, causing an error in subsequent access to name[17].

 

I noticed this when playing around with calindor.

 

diff --git a/ignore.c b/ignore.c
index e75997e..d9798d4 100644
--- a/ignore.c
+++ b/ignore.c
@@ -166,7 +166,7 @@ int pre_check_if_ignored (const char *input_text, int len, Uint8 channel)
		 {
			 offset++;
		 }
-			for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
+			for (i = 0; i < MAX_USERNAME_LENGTH && i+offset < len; i++)
		 {
			 ch = input_text[i+offset];
			 if (ch == ':' || ch == ' ' || is_color (ch))

Edited by ago

Share this post


Link to post
Share on other sites
Possible off-by-one error in ignore.c. The player name is copied to an array[17] and the loop exist in worst case with i==17, causing an error in subsequent access to name[17].

Yep, well spotted. Thanks for that.

 

It also is interesting because it shows a couple of other problems, with the way that MAX_USERNAME_LENGTH is handled in the client!

 

MAX_USERNAME_LENGTH is the number of characters allowed in a username. Therefore, for C strings you need MAX_USERNAME_LENGTH + 1 (for the terminating null on the end). However, the maximum number of characters allowed in a username on the server is 15. Therefore MAX_USERNAME_LENGTH already has the + 1 for the null. Every place in the client using MAX_USERNAME_LENGTH to define an array adds an additional + 1.

 

$ grep -rn "MAX_USERNAME_LENGTH" *
buddy.c:390:			buddy_name_input_id = pword_field_add_extended(buddy_add_win, buddy_name_input_id, NULL, x, y, buddy_add_x_len-x*2+10, 20, P_TEXT, 0.9f, 0.77f, 0.57f, 0.39f, buddy_name_buffer, MAX_USERNAME_LENGTH+1);
console.c:622:	for (i = 0; i <= MAX_USERNAME_LENGTH; i++)
console.c:634:	//ttlanhil: Is this even used? The previous for() loop should never make i larger than MAX_USERNAME_LENGTH
console.c:635:	if (i > MAX_USERNAME_LENGTH + 1 && ch != '\0')
console.c:733:	for (i = 0; i <= MAX_USERNAME_LENGTH; i++)
console.c:745:	//ttlanhil: Is this even used? The previous for() loop should never make i larger than MAX_USERNAME_LENGTH
console.c:746:	if (i > MAX_USERNAME_LENGTH + 1 && ch != '\0')
elconfig.c:1693:	add_var(OPT_STRING,"username","u",username_str,change_string,MAX_USERNAME_LENGTH,"Username","Your user name here",SERVER);
elconfig.c:1694:	add_var(OPT_PASSWORD,"password","p",password_str,change_string,MAX_USERNAME_LENGTH,"Password","Put your password here",SERVER);
ignore.c:130:	char name[MAX_USERNAME_LENGTH + 1] = {0};
ignore.c:138:			for (i = 0; i <= MAX_USERNAME_LENGTH && ((i+offset) < len); i++)
ignore.c:169:			for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
ignore.c:191:							for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
ignore.c:214:			for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
ignore.c:230:				for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
ignore.c:244:				for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++)
ignore.c:261:		for (i = 0; i <= MAX_USERNAME_LENGTH && i+offset < len; i++) {
ignore.h:25:	char name[MAX_USERNAME_LENGTH +1]; /*!< name of the player to ignore */
interface.c:419:	if(((ch>=48 && ch<=57) || (ch>=65 && ch<=90) || (ch>=97 && ch<=122) || (ch=='_')) && username_text_length <= MAX_USERNAME_LENGTH)
interface.c:437:	if ((ch>=32 && ch<=126) && password_text_length <= MAX_USERNAME_LENGTH)
interface.h:16:#define MAX_USERNAME_LENGTH 16
new_character.c:728:		else if (t->pos >= MAX_USERNAME_LENGTH)
text.c:636:		char name[MAX_USERNAME_LENGTH + 1];
text.c:637:		for(;text_to_add[len+8] != ':' && len < MAX_USERNAME_LENGTH; ++len);

In new_character.c >= MAX_USERNAME_LENGTH is checking if the position of the entered character is out of bounds. Due to t->pos counting from 0, this means you have 16 chrs which causes you to be kicked from the server when creating a new character if you type as much as you can.

 

In interface.c <= MAX_USERNAME_LENGTH is checking the number of characters in the entered username/password to see if we can add another. This means that because chr number 16 is only equal to MAX_USERNAME_LENGTH, we can add 17 chrs before trying to login. This simply causes us to be disconnected from the server, which without any sounds is silent. At least when attempting to login with 16 chrs the server returns an error message.

 

In console.c, the name arrays are defined as name[16].

In the loops, <= MAX_USERNAME_LENGTH is checking if we have space to add this character to the name, which finishes at 16. After the loop a null terminator is added to name[17]!

TTL is wrong in his statements about the loop never making i greater than MAX_USERNAME_LENGTH because it has to be greater to fail, however he is correct that the if statements will always fail.

In the if statements, i > MAX_USERNAME_LENGTH + 1 is checking if i > 17 and if the input char at that point is not a null. i won't fail there, but it still should not get larger than 16!

 

In the loops in ignore.c, i <= MAX_USERNAME_LENGTH would be the length before the terminating null, but it should never reach here because the server should only ever send a maximum of 15 chrs (plus null) for a username. The code does however make the incorrect assumption that MAX_USERNAME_LENGTH needs an additional character for the null terminator.

 

In text.c len < MAX_USERNAME_LENGTH is looping to find the length of the name within another string. It is not looking for a null terminator, and so is one char too big (as is the definition of name). It should never reach this point however, because the server should never send more than 15 chrs.

Share this post


Link to post
Share on other sites
It also is interesting because it shows a couple of other problems, with the way that MAX_USERNAME_LENGTH is handled in the client!

Yep, I've asked about changing that before but the discussion fizzled out. :)

See here.

Share this post


Link to post
Share on other sites
Yep, I've asked about changing that before but the discussion fizzled out. :)

See here.

Oh yeah, sorry about that. Please feel free to check my diff (do you get CVS updates?). I'd be interested to see if that is the same way you would do it (and a review is always a good thing).

Share this post


Link to post
Share on other sites
It also is interesting because it shows a couple of other problems, with the way that MAX_USERNAME_LENGTH is handled in the client!

Yep, I've asked about changing that before but the discussion fizzled out. :)

See here.

What ever the solution, it needs to be a single #define because the length could easily be changed. The server actually has more then 16 chars available for a char name, they just aren't allowed currently.

Share this post


Link to post
Share on other sites
What ever the solution, it needs to be a single #define because the length could easily be changed. The server actually has more then 16 chars available for a char name, they just aren't allowed currently.

Of course.

 

Every case I know of is now consistently using MAX_USERNAME_LENGTH, which is documented to include space for the terminating null.

Share this post


Link to post
Share on other sites
Every case I know of is now consistently using MAX_USERNAME_LENGTH, which is documented to include space for the terminating null.

My only concern about changing the code before was that the server appeared to accept a character name with one extra char than appeared to be valid. I didn't want to change the client code and prevent some long named user from login. I'm sure your changes are fine, I have updated my CVS but have not studied your chances in detail, I'll do that when I get a few minutes....

Share this post


Link to post
Share on other sites
My only concern about changing the code before was that the server appeared to accept a character name with one extra char than appeared to be valid. I didn't want to change the client code and prevent some long named user from login. I'm sure your changes are fine, I have updated my CVS but have not studied your chances in detail, I'll do that when I get a few minutes....

From my testing, the server would kick you offline when you tried to create a new character typing as many characters as possible (16).

 

When logging in, if you attempted to log in with the possible 17! characters the client allowed, the server would silently (hidden behind the login screen) kick you off. If you attempted with 16 characters, the server would reply with a "too many characters" error.

 

I have limited allowed input for both these cases (new character creation and login) to MAX_USERNAME_LENGTH - 1, so as long as that define is kept up-to-date with the server (like most things in the client) then everything should be peachy.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×