Skip to content

Instantly share code, notes, and snippets.

@jonm
Created October 10, 2015 18:59
Show Gist options
  • Save jonm/2037853e349e820eec79 to your computer and use it in GitHub Desktop.
Save jonm/2037853e349e820eec79 to your computer and use it in GitHub Desktop.
sure enough, the compiler warned us about this
[~/src/SillyMUD/src]$ rm interpreter.o dmserver
[~/src/SillyMUD/src]$ make
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o interpreter.o interpreter.c
...
interpreter.c:1255:19: warning: implicit declaration of function 'crypt' is
invalid in C99 [-Wimplicit-function-declaration]
if (strncmp(crypt(arg, d->character->player.name), d->pwd, 10)) {
^
...
interpreter.c:1335:21: warning: incompatible integer to pointer conversion
passing 'int' to parameter of type 'const char *' [-Wint-conversion]
strncpy(d->pwd, crypt(arg, d->character->player.name), 10);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
16 warnings generated.
gcc -o dmserver -g comm.o act.comm.o act.info.o act.move.o act.obj1.o act.obj2.o act.off.o act.other.o act.social.o act.wizard.o handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o mobact.o fight.o modify.o weather.o spells1.o spells2.o spell_parser.o reception.o constants.o spec_procs.o signals.o board.o magic.o magic2.o skills.o Opinion.o Trap.o magicutils.o multiclass.o hash.o Sound.o Heap.o spec_procs2.o magic3.o security.o spec_procs3.o create.o bsd.o parser.o intrinsics.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment