Feiwill
Joined: 12 Mar 2013 Posts: 7 Location: Czech Republic
|
Posted: Tue Mar 12, 2013 14:48 Post subject: Build of nwnx_spells fails (svn trunk rev 506) |
|
|
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 |
|