logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Build of nwnx_spells fails (svn trunk rev 506)

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Feiwill



Joined: 12 Mar 2013
Posts: 7
Location: Czech Republic

PostPosted: Tue Mar 12, 2013 14:48    Post subject: Build of nwnx_spells fails (svn trunk rev 506) Reply with quote

Compilation of the spells plugin fails (svn trunk revision 506, 32b Gentoo Linux, gcc 4.6.3):

Code:
gcc -mtune=i386 -pipe -g -O2 -Wall -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include -mtune=i386 -pipe  -Wall -D_REENTRANT -D_THREAD_SAFE -I. -I.. -I../.. -I ../../include -I/usr/local/include  -c -o hooks/h_ComputeSpellRange.o hooks/h_ComputeSpellRange.c
hooks/h_ComputeSpellRange.c: In function ‘Hook_GetSpellRange’:
hooks/h_ComputeSpellRange.c:36:10: warning: variable ‘no_bonus’ set but not used [-Wunused-but-set-variable]


The gcc call has -Werror missing; I had to remove it manually to compile the plugin. Normally, nwnx build fails at this point.

The problem seems to be that there are three uses of the variable no_bonus in hooks/h_ComputeSpellRange.c that are not within the #ifdef NWNX_SPELLS_HG -- #endif block. When I put the blocks around those three lines, the build proceeds without a warning.

I concluded that the #ifdef blocks should be there because the only place no_bonus is used in the whole nwnx_spells sourcecode is already in a #ifdef NWNX_SPELLS_HG block. I guess the build is called without NWNX_SPELLS_HG on my system.
_________________
Arkhalia: Czech/Slovak PG/action/loot NWN1 server
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group