This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make test | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o test.act.wizard.o test.act.wizard.c | |
gcc -o tests 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 test.act.wizard.o -lcriterion | |
./tests | |
[====] Synthesis: Tested: 1 | Passing: 1 | Failing: 0 | Crashing: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <criterion/criterion.h> | |
void dsearch(char *, char *); | |
Test(act_wizard, dsearch_simple) { | |
char arg[255], dst[255]; | |
sprintf(arg, "Someone appears!"); | |
dsearch(arg, dst); | |
cr_assert_str_eq(dst, "Someone appears!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Bamfin and bamfout - courtesy of DM from Epic */ | |
void dsearch(char *string, char *tmp) | |
{ | |
char *c, buf[255], buf2[255], buf3[255]; | |
int i, j; | |
i = 0; | |
while(i == 0) { | |
if(strchr(string, '~')==NULL) { | |
i = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.wizard.o act.wizard.c | |
act.wizard.c:243:24: error: format string is not a string literal | |
(potentially insecure) [-Werror,-Wformat-security] | |
sprintf(string, tmp); | |
^~~ | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.off.o act.off.c | |
act.off.c:1238:3: error: incompatible pointer types initializing 'void (*)()' | |
with an expression of type 'void (byte, struct char_data *, char *, int, | |
struct char_data *, struct obj_data *)' | |
[-Werror,-Wincompatible-pointer-types] | |
cast_geyser, | |
^~~~~~~~~~~ | |
... | |
6 errors generated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.obj1.o act.obj1.c | |
act.obj1.c:51:39: error: equality comparison with extraneous parentheses | |
[-Werror,-Wparentheses-equality] | |
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ | |
act.obj1.c:51:39: note: remove extraneous parentheses around the comparison to | |
silence this warning | |
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) { | |
~ ^ ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.info.o act.info.c | |
act.info.c:2785:58: error: format specifies type 'int' but the argument has type | |
'long' [-Werror,-Wformat] | |
sprintf(buf, "Total number of rooms in world: %d\n\r", room_count); | |
~~ ^~~~~~~~~~ | |
%ld | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c | |
comm.c:1538:18: error: using the result of an assignment as a condition without | |
parentheses [-Werror,-Wparentheses] | |
while (*point = *(i++)) | |
~~~~~~~^~~~~~~~ | |
comm.c:1538:18: note: place parentheses around the assignment to silence this | |
warning | |
while (*point = *(i++)) | |
^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int CAN_SEE_OBJ( struct char_data *ch, struct obj_data *obj) | |
{ | |
if (IS_IMMORTAL(ch)) | |
return(1); | |
/* ... */ | |
return(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c | |
comm.c:1514:18: error: implicit declaration of function 'CAN_SEE_OBJ' is invalid | |
in C99 [-Werror,-Wimplicit-function-declaration] | |
case 'o': i = OBJN(obj, to); | |
^ | |
./utils.h:239:26: note: expanded from macro 'OBJN' | |
#define OBJN(obj, vict) (CAN_SEE_OBJ((vict), (obj)) ? \ | |
^ | |
... |