[CF-Devel] scriptfire compile warnings

Mark Wedel mwedel at scruz.net
Sat Jun 16 02:58:39 CDT 2001


 Could the following please be done with the scriptfire mods:

1) Add in the standard copyright (and version id) heading to the files?

2) Perhaps change the autoconf stuff so that it doesn't put the guile flags into
EXTRA_.. flags and instead puts it into the CFLAGS And LIBS and LDFLAGS autoconf
values?  Reason is twofold - by putting it in those, you can actually run the
'make' from one of the subdirectories and get all the needed values and second,
the EXTRA_... flags were really meant for customizations the end user may want
to put in, and were not met for putting in stuff found by autoconf

3) Fix the following compiling warnings (these were found with gcc -Wall).  Many
of these are harmles, but crossfire generally compiles cleanly with -Wall, and
some of these are probably real errors (the only warnings that should show up
when compiling with -Wall is for the files automatically generated from the .l
files (ie, loader.c, reader.c, ...) - there isn't much that can be done since
the .c files are automatically generated save for hand editing (or doing greps
or sed or other goofy stuff) with the files that flex generates.

 Thanks.

arch.c: In function `find_archetype_by_object_name':
arch.c:56: warning: unused variable `i'
arch.c:55: warning: unused variable `index'
arch.c: In function `find_best_weapon_used_match':
arch.c:104: warning: implicit declaration of function `item_matched_string'

 (btw, I really don't think item_matched_string should be in this file - if
needed by the common side, then perhaps in item.c, but that is not an arch
related function)

apply.c: In function `manual_apply':
apply.c:1981: warning: `return' with no value, in function returning non-void
apply.c:1986: warning: `return' with no value, in function returning non-void
attack.c: In function `attack_ob_simple':
attack.c:415: warning: `return' with no value, in function returning non-void
gcc -ggdb -pg -Wall -I/usr/include  -I../include -I./../include -c ban.c
attack.c: In function `kill_object':
attack.c:1028: warning: `return' with no value, in function returning non-void
attack.c:1036: warning: `return' with no value, in function returning non-void
attack.c:1018: warning: unused variable `hitter_tag'
attack.c:1018: warning: unused variable `op_tag'
attack.c:1017: warning: unused variable `simple_attack'
attack.c:1016: warning: unused variable `body_attack'
attack.c:1015: warning: unused variable `magic'
attack.c:1015: warning: unused variable `attacknum'
attack.c:1015: warning: unused variable `attacktype'
attack.c:1015: warning: unused variable `ndam'
attack.c: In function `hit_player':
attack.c:1258: warning: unused variable `battleg'
attack.c:1253: warning: unused variable `old_hitter'
attack.c:1252: warning: unused variable `buf'
main.c: In function `main':
main.c:1051: warning: control reaches end of non-void function
monster.c: In function `talk_to_npc':
monster.c:1355: warning: `return' with no value, in function returning non-void
script.c: In function `guile_init_functions':
script.c:227: warning: implicit declaration of function
`guile_init_spell_functions'
script.c: In function `guile_call_event':
script.c:240: warning: unused variable `buf'
script.c: In function `guile_call_event_str':
script.c:274: warning: unused variable `buf'
script.c: In function `guile_use_weapon_script':
script.c:308: warning: unused variable `buf'
script.c: In function `Script_setCursed':
script.c:474: warning: control reaches end of non-void function
script.c: In function `Script_activateRune':
script.c:479: warning: control reaches end of non-void function
script.c: In function `Script_checkTrigger':
script.c:484: warning: control reaches end of non-void function
script.c: In function `Script_setUnaggressive':
script.c:497: warning: control reaches end of non-void function
script.c: In function `Script_setGod':
script.c:529: warning: control reaches end of non-void function
script.c: In function `Script_setWeight':
script.c:534: warning: control reaches end of non-void function
script.c: In function `Script_teleport':
script.c:558: warning: control reaches end of non-void function
script.c: In function `Script_pickUp':
script.c:568: warning: control reaches end of non-void function
script.c: In function `Script_getMap':
script.c:600: warning: control reaches end of non-void function
script.c: In function `Script_setQuantity':
script.c:605: warning: control reaches end of non-void function
script.c: In function `Script_insertObjectInside':
script.c:621: warning: control reaches end of non-void function
script.c: In function `Script_drop':
script.c:649: warning: control reaches end of non-void function
script.c: In function `Script_take':
script.c:657: warning: control reaches end of non-void function
script.c: In function `Script_setInvisible':
script.c:677: warning: control reaches end of non-void function
script.c: In function `Script_setXP':
script.c:687: warning: control reaches end of non-void function
script.c: In function `Script_setReturnValue':
script.c:696: warning: control reaches end of non-void function
script.c: In function `Script_setDirection':
script.c:707: warning: control reaches end of non-void function
script.c: In function `Script_setScriptDeath':
script.c:757: warning: control reaches end of non-void function
script.c: In function `Script_setScriptLoad':
script.c:764: warning: control reaches end of non-void function
script.c: In function `Script_setScriptApply':
script.c:771: warning: control reaches end of non-void function
script.c: In function `Script_setScriptSay':
script.c:778: warning: control reaches end of non-void function
script.c: In function `Script_setScriptTrigger':
script.c:785: warning: control reaches end of non-void function
script.c: In function `Script_setScriptTime':
script.c:799: warning: control reaches end of non-void function
script.c: In function `Script_setScriptAttack':
script.c:806: warning: control reaches end of non-void function
script.c: In function `Script_setScriptDrop':
script.c:813: warning: control reaches end of non-void function
script.c: In function `Script_setScriptThrow':
script.c:820: warning: control reaches end of non-void function
script.c: In function `Script_setScriptStop':
script.c:827: warning: control reaches end of non-void function
script.c: In function `Script_setSpeed':
script.c:832: warning: control reaches end of non-void function
script.c: In function `Script_setLastSP':
script.c:846: warning: control reaches end of non-void function
script.c: In function `Script_setLastGP':
script.c:856: warning: control reaches end of non-void function
script.c: In function `Script_fixObject':
script.c:861: warning: control reaches end of non-void function
script.c: In function `Script_setFace':
script.c:870: warning: control reaches end of non-void function
script.c: In function `Script_setAttackType':
script.c:875: warning: control reaches end of non-void function
script.c: In function `Script_setDamage':
script.c:885: warning: control reaches end of non-void function
script.c: In function `Script_getDamage':
script.c:890: warning: control reaches end of non-void function
script.c: In function `Script_setBeenApplied':
script.c:902: warning: control reaches end of non-void function
script.c: In function `Script_setIdentified':
script.c:914: warning: control reaches end of non-void function
script.c: In function `Script_killObject':
script.c:930: warning: implicit declaration of function `kill_object'
script.c:942: warning: control reaches end of non-void function
script.c: In function `Script_castAbility':
script.c:982: warning: control reaches end of non-void function
script.c: In function `Script_castSpell':
script.c:990: warning: control reaches end of non-void function
script.c: In function `Script_forgetSpell':
script.c:995: warning: control reaches end of non-void function
script.c: In function `Script_acquireSpell':
script.c:1000: warning: control reaches end of non-void function
script.c: In function `Script_removeObject':
script.c:1174: warning: control reaches end of non-void function
script.c: In function `Script_crossfireSay':
script.c:1211: warning: control reaches end of non-void function
script.c: In function `Script_crossfireWrite':
script.c:1216: warning: unused variable `buf'
script.c:1234: warning: control reaches end of non-void function
script.c: In function `Script_crossfireMessage':
script.c:1239: warning: unused variable `buf'
script.c:1254: warning: control reaches end of non-void function
gcc -ggdb -pg -Wall -I/usr/include  -I../include -I./../include -c
script_types.c
script.c: In function `Script_setPosition':
script.c:1475: warning: control reaches end of non-void function
script.c: In function `Script_setTitle':
script.c:1502: warning: control reaches end of non-void function
script.c: In function `Script_setAC':
script.c:1510: warning: control reaches end of non-void function
script.c: In function `Script_setHP':
script.c:1574: warning: control reaches end of non-void function
script.c: In function `Script_setSP':
script.c:1582: warning: control reaches end of non-void function
script.c: In function `Script_setFP':
script.c:1590: warning: control reaches end of non-void function
script.c: In function `Script_setGP':
script.c:1598: warning: control reaches end of non-void function
script.c: In function `Script_setMaxHP':
script.c:1606: warning: control reaches end of non-void function
script.c: In function `Script_setMaxSP':
script.c:1614: warning: control reaches end of non-void function
script.c: In function `Script_setCha':
script.c:1622: warning: unused variable `buf'
script.c:1629: warning: control reaches end of non-void function
script.c: In function `Script_setStr':
script.c:1642: warning: control reaches end of non-void function
script.c: In function `Script_setDex':
script.c:1655: warning: control reaches end of non-void function
script.c: In function `Script_setInt':
script.c:1668: warning: control reaches end of non-void function
script.c: In function `Script_setWis':
script.c:1681: warning: control reaches end of non-void function
script.c: In function `Script_setPow':
script.c:1694: warning: control reaches end of non-void function
script.c: In function `Script_setCon':
script.c:1707: warning: control reaches end of non-void function

    
    


More information about the crossfire mailing list