Created
October 3, 2015 21:19
-
-
Save jonm/95f3dc3c3a47397b9572 to your computer and use it in GitHub Desktop.
make run after fixing initial compilation errors in comm.c
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
$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c | |
comm.c:163:25: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
} else if ((port = atoi(argv[pos])) <= 1024) { | |
^ | |
comm.c:163:8: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
} else if ((port = atoi(argv[pos])) <= 1024) { | |
^ | |
comm.c:173:7: warning: implicit declaration of function 'chdir' is invalid in C99 [-Wimplicit-function-declaration] | |
if (chdir(dir) < 0) { | |
^ | |
comm.c:181:3: warning: implicit declaration of function 'srandom' is invalid in C99 [-Wimplicit-function-declaration] | |
srandom(time(0)); | |
^ | |
comm.c:202:3: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] | |
close(0); | |
^ | |
comm.c:254:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
comm.c:291:17: warning: implicit declaration of function 'getdtablesize' is invalid in C99 [-Wimplicit-function-declaration] | |
avail_descs = getdtablesize() -2; | |
^ | |
comm.c:434:4: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else | |
^ | |
comm.c:447:4: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else { | |
^ | |
comm.c:582:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
comm.c:615:2: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(tmp->text); | |
^ | |
comm.c:634:3: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned long, unsigned long)' | |
CREATE(new, struct txt_block, 1); | |
^ | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
comm.c:634:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'calloc' | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
comm.c:634:3: warning: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' | |
CREATE(new, struct txt_block, 1); | |
^ | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
comm.c:634:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'abort' | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
comm.c:721:2: warning: implicit declaration of function 'gethostname' is invalid in C99 [-Wimplicit-function-declaration] | |
gethostname(hostname, MAX_HOSTNAME); | |
^ | |
comm.c:737:3: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' | |
exit (1); | |
^ | |
comm.c:737:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' | |
comm.c:747:14: warning: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Wincompatible-pointer-types] | |
if (bind(s, &sa, sizeof(sa)) < 0) { | |
^~~ | |
/usr/include/sys/socket.h:557:38: note: passing argument to parameter here | |
int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); | |
^ | |
comm.c:775:47: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] | |
if ((t = accept(s, (struct sockaddr *)&isa, &i)) < 0){ | |
^~ | |
/usr/include/sys/socket.h:555:69: note: passing argument to parameter here | |
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) | |
^ | |
comm.c:815:25: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] | |
strcpy(buf, (char *)inet_ntoa(addr)); | |
^ | |
/usr/include/secure/_string.h:83:33: note: expanded from macro 'strcpy' | |
__builtin___strcpy_chk (dest, src, __darwin_obsz (dest)) | |
^ | |
comm.c:815:17: warning: cast to 'char *' from smaller integer type 'int' [-Wint-to-pointer-cast] | |
strcpy(buf, (char *)inet_ntoa(addr)); | |
^ | |
/usr/include/secure/_string.h:83:33: note: expanded from macro 'strcpy' | |
__builtin___strcpy_chk (dest, src, __darwin_obsz (dest)) | |
^ | |
comm.c:874:52: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] | |
if (getpeername(desc, (struct sockaddr *) &sock, &size) < 0) { | |
^~~~~ | |
/usr/include/sys/socket.h:559:74: note: passing argument to parameter here | |
int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) | |
^ | |
comm.c:881:36: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion] | |
if ((long) strncpy(newd->host, inet_ntoa(sock.sin_addr), 49) > 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy' | |
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest)) | |
^ | |
comm.c:960:19: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] | |
thisround = write(desc, txt + sofar, total - sofar); | |
^ | |
comm.c:990:22: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] | |
if ((thisround = read(t->descriptor, t->buf + begin + sofar, | |
^ | |
comm.c:1264:2: warning: implicit declaration of function 'sleep' is invalid in C99 [-Wimplicit-function-declaration] | |
sleep(2); | |
^ | |
comm.c:1505:18: warning: implicit declaration of function 'CAN_SEE_OBJ' is invalid in C99 [-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)) ? \ | |
^ | |
comm.c:1529:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
while (*point = *(i++)) | |
~~~~~~~^~~~~~~~ | |
comm.c:1529:18: note: place parentheses around the assignment to silence this warning | |
while (*point = *(i++)) | |
^ | |
( ) | |
comm.c:1529:18: note: use '==' to turn this assignment into an equality comparison | |
while (*point = *(i++)) | |
^ | |
== | |
comm.c:1559:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
27 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.comm.o act.comm.c | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.info.o act.info.c | |
act.info.c:114:11: warning: implicit declaration of function 'CAN_SEE_OBJ' is invalid in C99 [-Wimplicit-function-declaration] | |
if (CAN_SEE_OBJ(ch,equipment[(*j)])) { | |
^ | |
act.info.c:118:9: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
} else if( IS_AFFECTED2(ch, AFF2_SUN_BLIND)) { /* sun blind can see */ | |
^ | |
act.info.c:341:6: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
} else { | |
^ | |
act.info.c:694:2: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else | |
^ | |
act.info.c:2425:11: warning: implicit declaration of function 'MobLevBonus' is invalid in C99 [-Wimplicit-function-declaration] | |
diff += MobLevBonus(victim); | |
^ | |
act.info.c:2782:58: warning: format specifies type 'int' but the argument has type 'long' [-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__) | |
^ | |
act.info.c:2797:60: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] | |
sprintf(buf, "Total number of monsters in game: %d\n\r", mob_count); | |
~~ ^~~~~~~~~ | |
%ld | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
act.info.c:2800:59: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] | |
sprintf(buf, "Total number of objects in game: %d\n\r", obj_count); | |
~~ ^~~~~~~~~ | |
%ld | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
act.info.c:3209:6: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
i = atoi(arg); | |
^ | |
act.info.c:3356:6: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(person->specials.gname); | |
^ | |
10 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.move.o act.move.c | |
act.move.c:367:5: warning: implicit declaration of function 'DisplayOneMove' is invalid in C99 [-Wimplicit-function-declaration] | |
DisplayOneMove(ch, dir, was_in); | |
^ | |
act.move.c:401:13: warning: implicit declaration of function 'AddToCharHeap' is invalid in C99 [-Wimplicit-function-declaration] | |
if (!AddToCharHeap(heap_ptr, &heap_top, heap_tot, | |
^ | |
act.move.c:414:4: warning: implicit declaration of function 'DisplayGroupMove' is invalid in C99 [-Wimplicit-function-declaration] | |
DisplayGroupMove(heap_ptr[i], dir, was_in, heap_tot[i]); | |
^ | |
act.move.c:421:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.move.c:425:3: warning: implicit declaration of function 'DisplayMove' is invalid in C99 [-Wimplicit-function-declaration] | |
DisplayMove(ch, dir, was_in, 1); | |
^ | |
act.move.c:426:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.move.c:431:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.move.c:599:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.move.c:690:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] | |
open_door(struct char_data *ch, int dir) | |
^~~~~~~~~ | |
act.move.c:731:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.move.c:733:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] | |
raw_open_door(struct char_data *ch, int dir) | |
^~~~~~~~~~~~~ | |
act.move.c:763:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
12 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.obj1.o act.obj1.c | |
act.obj1.c:51:39: warning: equality comparison with extraneous parentheses [-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)) { | |
~ ^ ~ | |
act.obj1.c:51:39: note: use '=' to turn this equality comparison into an assignment | |
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) { | |
^~ | |
= | |
act.obj1.c:135:11: warning: implicit declaration of function 'CAN_SEE_OBJ' is invalid in C99 [-Wimplicit-function-declaration] | |
if (CAN_SEE_OBJ(ch,obj_object)) { | |
^ | |
act.obj1.c:170:28: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg1,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:173:44: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg1,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:233:10: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if(blah = get_obj_in_list_vis(ch, arg2, ch->carrying)){ | |
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.obj1.c:233:10: note: place parentheses around the assignment to silence this warning | |
if(blah = get_obj_in_list_vis(ch, arg2, ch->carrying)){ | |
^ | |
( ) | |
act.obj1.c:233:10: note: use '==' to turn this assignment into an equality comparison | |
if(blah = get_obj_in_list_vis(ch, arg2, ch->carrying)){ | |
^ | |
== | |
act.obj1.c:303:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if(blah=get_obj_in_list_vis(ch,arg2, ch->carrying)) has=TRUE; | |
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.obj1.c:303:16: note: place parentheses around the assignment to silence this warning | |
if(blah=get_obj_in_list_vis(ch,arg2, ch->carrying)) has=TRUE; | |
^ | |
( ) | |
act.obj1.c:303:16: note: use '==' to turn this assignment into an equality comparison | |
if(blah=get_obj_in_list_vis(ch,arg2, ch->carrying)) has=TRUE; | |
^ | |
== | |
act.obj1.c:304:25: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg1,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:307:41: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg1,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:388:14: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
amount = atoi(arg); | |
^ | |
act.obj1.c:450:29: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:453:45: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:516:30: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg1,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:519:46: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg1,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:699:32: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(obj_name,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.obj1.c:702:48: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(obj_name,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
15 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.obj2.o act.obj2.c | |
act.obj2.c:42:21: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
} else if (tmp_ch = obj->carried_by) { | |
~~~~~~~^~~~~~~~~~~~~~~~~ | |
act.obj2.c:42:21: note: place parentheses around the assignment to silence this warning | |
} else if (tmp_ch = obj->carried_by) { | |
^ | |
( ) | |
act.obj2.c:42:21: note: use '==' to turn this assignment into an equality comparison | |
} else if (tmp_ch = obj->carried_by) { | |
^ | |
== | |
act.obj2.c:46:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
} else if (tmp_obj = obj->in_obj) { | |
~~~~~~~~^~~~~~~~~~~~~ | |
act.obj2.c:46:22: note: place parentheses around the assignment to silence this warning | |
} else if (tmp_obj = obj->in_obj) { | |
^ | |
( ) | |
act.obj2.c:46:22: note: use '==' to turn this assignment into an equality comparison | |
} else if (tmp_obj = obj->in_obj) { | |
^ | |
== | |
act.obj2.c:66:5: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(obj->name); | |
^ | |
act.obj2.c:78:3: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned long, unsigned long)' | |
CREATE(new_name,char,strlen(obj->name)+strlen(drinknames[type])+2); | |
^ | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
act.obj2.c:78:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'calloc' | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
act.obj2.c:78:3: warning: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' | |
CREATE(new_name,char,strlen(obj->name)+strlen(drinknames[type])+2); | |
^ | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
act.obj2.c:78:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'abort' | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
act.obj2.c:506:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] | |
perform_wear(struct char_data *ch, struct obj_data *obj_object, int keyword) | |
^~~~~~~~~~~~ | |
act.obj2.c:555:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.obj2.c:1171:6: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
if (atoi(T) > 0 && atoi(T) <= Num_Equip) { | |
^ | |
8 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.off.o act.off.c | |
act.off.c:240:4: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else | |
^ | |
act.off.c:398:15: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
nmbr = atoi(buf); | |
^ | |
act.off.c:457:17: warning: implicit declaration of function 'MoveOne' is invalid in C99 [-Wimplicit-function-declaration] | |
if ((die = MoveOne(RIDDEN(ch), attempt, FALSE))== 1) { | |
^ | |
act.off.c:1235:3: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_geyser, | |
^~~~~~~~~~~ | |
act.off.c:1236:3: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_fire_breath, cast_gas_breath, cast_frost_breath, cast_acid_breath, | |
^~~~~~~~~~~~~~~~ | |
act.off.c:1236:21: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_fire_breath, cast_gas_breath, cast_frost_breath, cast_acid_breath, | |
^~~~~~~~~~~~~~~ | |
act.off.c:1236:38: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_fire_breath, cast_gas_breath, cast_frost_breath, cast_acid_breath, | |
^~~~~~~~~~~~~~~~~ | |
act.off.c:1236:57: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_fire_breath, cast_gas_breath, cast_frost_breath, cast_acid_breath, | |
^~~~~~~~~~~~~~~~ | |
act.off.c:1237:3: warning: incompatible pointer types initializing 'void (*)()' with an expression of type 'void (byte, struct char_data *, char *, int, struct char_data *, struct obj_data *)' [-Wincompatible-pointer-types] | |
cast_lightning_breath}; | |
^~~~~~~~~~~~~~~~~~~~~ | |
9 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.other.o act.other.c | |
act.other.c:85:27: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.other.c:88:43: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.other.c:169:5: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(ch->player.title); | |
^ | |
act.other.c:493:6: warning: implicit declaration of function 'CAN_SEE_OBJ' is invalid in C99 [-Wimplicit-function-declaration] | |
CAN_SEE_OBJ(ch,victim->equipment[eq_pos])) { | |
^ | |
act.other.c:588:7: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
} else { | |
^ | |
act.other.c:1521:33: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' | |
ch->specials.A_list = (Alias *)malloc(sizeof(Alias)); | |
^ | |
act.other.c:1521:33: note: please include the header <stdlib.h> or explicitly provide a declaration for 'malloc' | |
act.other.c:1527:13: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
num = atoi(p); | |
^ | |
act.other.c:1600:1: warning: control reaches end of non-void function [-Wreturn-type] | |
} | |
^ | |
act.other.c:1838:27: warning: comparison between pointer and integer ('int' and 'void *') | |
if (getall(arg,newarg)!=NULL) { | |
~~~~~~~~~~~~~~~~~~^ ~~~~ | |
act.other.c:1841:43: warning: comparison between pointer and integer ('int' and 'void *') | |
} else if ((p = getabunch(arg,newarg))!=NULL) { | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~ | |
10 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.social.o act.social.c | |
act.social.c:63:7: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' | |
exit(0); | |
^ | |
act.social.c:63:7: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' | |
act.social.c:70:7: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned long, unsigned long)' | |
CREATE(rslt, char, strlen(buf) + 1); | |
^ | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
act.social.c:70:7: note: please include the header <stdlib.h> or explicitly provide a declaration for 'calloc' | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
act.social.c:70:7: warning: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' | |
CREATE(rslt, char, strlen(buf) + 1); | |
^ | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
act.social.c:70:7: note: please include the header <stdlib.h> or explicitly provide a declaration for 'abort' | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
act.social.c:104:8: warning: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned long)' | |
realloc(soc_mess_list, sizeof (struct social_messg) * | |
^ | |
act.social.c:104:8: note: please include the header <stdlib.h> or explicitly provide a declaration for 'realloc' | |
act.social.c:232:12: warning: implicit declaration of function 'random' is invalid in C99 [-Wimplicit-function-declaration] | |
switch(random()%3) { | |
^ | |
5 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o act.wizard.o act.wizard.c | |
act.wizard.c:159:21: warning: implicit declaration of function 'crypt' is invalid in C99 [-Wimplicit-function-declaration] | |
strncpy(pass, crypt(npasswd, tmp_store.name), 10); | |
^ | |
/usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy' | |
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest)) | |
^ | |
act.wizard.c:159:21: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion] | |
strncpy(pass, crypt(npasswd, tmp_store.name), 10); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy' | |
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest)) | |
^ | |
act.wizard.c:201:11: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
sev = atoi(buf); | |
^ | |
act.wizard.c:240:24: warning: format string is not a string literal (potentially insecure) [-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__) | |
^ | |
act.wizard.c:265:5: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(ch->specials.poofin); | |
^ | |
act.wizard.c:283:34: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' | |
ch->specials.poofin = (char *)malloc(len+1); | |
^ | |
act.wizard.c:283:34: note: please include the header <stdlib.h> or explicitly provide a declaration for 'malloc' | |
act.wizard.c:720:7: warning: implicit declaration of function 'system' is invalid in C99 [-Wimplicit-function-declaration] | |
system(buf); | |
^ | |
act.wizard.c:867:27: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
} else if (target_mob = get_char_vis(ch, loc_str)) { | |
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:867:27: note: place parentheses around the assignment to silence this warning | |
} else if (target_mob = get_char_vis(ch, loc_str)) { | |
^ | |
( ) | |
act.wizard.c:867:27: note: use '==' to turn this assignment into an equality comparison | |
} else if (target_mob = get_char_vis(ch, loc_str)) { | |
^ | |
== | |
act.wizard.c:869:26: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
} else if (target_obj=get_obj_vis_world(ch, loc_str, NULL)) | |
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:869:26: note: place parentheses around the assignment to silence this warning | |
} else if (target_obj=get_obj_vis_world(ch, loc_str, NULL)) | |
^ | |
( ) | |
act.wizard.c:869:26: note: use '==' to turn this assignment into an equality comparison | |
} else if (target_obj=get_obj_vis_world(ch, loc_str, NULL)) | |
^ | |
== | |
act.wizard.c:947:23: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
else if (target_mob = get_char_vis_world(ch, buf, NULL)) | |
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:947:23: note: place parentheses around the assignment to silence this warning | |
else if (target_mob = get_char_vis_world(ch, buf, NULL)) | |
^ | |
( ) | |
act.wizard.c:947:23: note: use '==' to turn this assignment into an equality comparison | |
else if (target_mob = get_char_vis_world(ch, buf, NULL)) | |
^ | |
== | |
act.wizard.c:949:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
else if (target_obj=get_obj_vis_world(ch, buf, NULL)) | |
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:949:22: note: place parentheses around the assignment to silence this warning | |
else if (target_obj=get_obj_vis_world(ch, buf, NULL)) | |
^ | |
( ) | |
act.wizard.c:949:22: note: use '==' to turn this assignment into an equality comparison | |
else if (target_obj=get_obj_vis_world(ch, buf, NULL)) | |
^ | |
== | |
act.wizard.c:1175:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (k = get_char_vis_world(ch, arg1, &count)){ | |
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:1175:11: note: place parentheses around the assignment to silence this warning | |
if (k = get_char_vis_world(ch, arg1, &count)){ | |
^ | |
( ) | |
act.wizard.c:1175:11: note: use '==' to turn this assignment into an equality comparison | |
if (k = get_char_vis_world(ch, arg1, &count)){ | |
^ | |
== | |
act.wizard.c:1242:8: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] | |
k->player.time.played); | |
^~~~~~~~~~~~~~~~~~~~~ | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
act.wizard.c:1391:48: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] | |
apply_types[aff->location],aff->bitvector); | |
^~~~~~~~~~~~~~ | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
act.wizard.c:1420:10: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (j=(struct obj_data *)get_obj_vis_world(ch, arg1, &count)) { | |
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:1420:10: note: place parentheses around the assignment to silence this warning | |
if (j=(struct obj_data *)get_obj_vis_world(ch, arg1, &count)) { | |
^ | |
( ) | |
act.wizard.c:1420:10: note: use '==' to turn this assignment into an equality comparison | |
if (j=(struct obj_data *)get_obj_vis_world(ch, arg1, &count)) { | |
^ | |
== | |
act.wizard.c:1602:8: warning: equality comparison result unused [-Wunused-comparison] | |
found == TRUE; | |
~~~~~~^~~~~~~ | |
act.wizard.c:1602:8: note: use '=' to turn this equality comparison into an assignment | |
found == TRUE; | |
^~ | |
= | |
act.wizard.c:1611:49: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] | |
sprintf(buf," Affects : %s By %d\n\r", buf2,j->affected[i].modifier); | |
~~ ^~~~~~~~~~~~~~~~~~~~~~~ | |
%lu | |
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' | |
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | |
^ | |
act.wizard.c:1666:27: warning: more '%' conversions than data arguments [-Wformat] | |
sscanf(parmstr,"%d %d",&parm); | |
~^ | |
act.wizard.c:2260:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (vict = get_char_room_vis(ch, name)) { | |
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:2260:14: note: place parentheses around the assignment to silence this warning | |
if (vict = get_char_room_vis(ch, name)) { | |
^ | |
( ) | |
act.wizard.c:2260:14: note: use '==' to turn this assignment into an equality comparison | |
if (vict = get_char_room_vis(ch, name)) { | |
^ | |
== | |
act.wizard.c:2280:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
} else if (obj = get_obj_in_list_vis | |
~~~~^~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:2280:22: note: place parentheses around the assignment to silence this warning | |
} else if (obj = get_obj_in_list_vis | |
^ | |
act.wizard.c:2280:22: note: use '==' to turn this assignment into an equality comparison | |
} else if (obj = get_obj_in_list_vis | |
^ | |
== | |
act.wizard.c:2635:27: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration] | |
ch->player.time.logon = time(0); | |
^ | |
act.wizard.c:3090:40: warning: '&&' within '||' [-Wlogical-op-parentheses] | |
} else if (is_abbrev(buf, "objects") && | |
~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | |
act.wizard.c:3090:40: note: place parentheses around the '&&' expression to silence this warning | |
} else if (is_abbrev(buf, "objects") && | |
^ | |
act.wizard.c:3092:33: warning: '&&' within '||' [-Wlogical-op-parentheses] | |
is_abbrev(buf, "mobiles") && | |
~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | |
act.wizard.c:3092:33: note: place parentheses around the '&&' expression to silence this warning | |
is_abbrev(buf, "mobiles") && | |
^ | |
act.wizard.c:3113:19: warning: '&&' within '||' [-Wlogical-op-parentheses] | |
if (zone>=0 && (oi->virtual<bottom || oi->virtual>top) || | |
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
act.wizard.c:3113:19: note: place parentheses around the '&&' expression to silence this warning | |
if (zone>=0 && (oi->virtual<bottom || oi->virtual>top) || | |
^ | |
( ) | |
act.wizard.c:3114:11: warning: '&&' within '||' [-Wlogical-op-parentheses] | |
zone<0 && !isname(zonenum, oi->name)) | |
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
act.wizard.c:3114:11: note: place parentheses around the '&&' expression to silence this warning | |
zone<0 && !isname(zonenum, oi->name)) | |
^ | |
( ) | |
25 warnings generated. | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o handler.o handler.c | |
handler.c:60:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
while (s=strtok(NULL, sep)) { | |
~^~~~~~~~~~~~~~~~~~ | |
handler.c:60:12: note: place parentheses around the assignment to silence this warning | |
while (s=strtok(NULL, sep)) { | |
^ | |
( ) | |
handler.c:60:12: note: use '==' to turn this assignment into an equality comparison | |
while (s=strtok(NULL, sep)) { | |
^ | |
== | |
handler.c:110:21: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' | |
sb->data = (char*)malloc(sb->size=128); | |
^ | |
handler.c:110:21: note: please include the header <stdlib.h> or explicitly provide a declaration for 'malloc' | |
handler.c:121:23: warning: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned long)' | |
sb->data = (char*)realloc(sb->data, sb->size); | |
^ | |
handler.c:121:23: note: please include the header <stdlib.h> or explicitly provide a declaration for 'realloc' | |
handler.c:133:3: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] | |
free(sb->data); | |
^ | |
handler.c:203:8: error: macro names must be identifiers | |
#ifdef 0 | |
^ | |
handler.c:497:3: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned long, unsigned long)' | |
CREATE(affected_alloc, struct affected_type, 1); | |
^ | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
handler.c:497:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'calloc' | |
./utils.h:33:28: note: expanded from macro 'CREATE' | |
if (!((result) = (type *) calloc ((number), sizeof(type))))\ | |
^ | |
handler.c:497:3: warning: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' | |
CREATE(affected_alloc, struct affected_type, 1); | |
^ | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
handler.c:497:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'abort' | |
./utils.h:34:31: note: expanded from macro 'CREATE' | |
{ perror("malloc failure"); abort(); }\ | |
^ | |
handler.c:675:9: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
} else { | |
^ | |
handler.c:967:12: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] | |
return(atoi(number)); | |
^ | |
handler.c:1563:7: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' | |
exit(0); | |
^ | |
handler.c:1563:7: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' | |
handler.c:1671:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (i = get_char_room_vis(ch, name)) | |
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1671:9: note: place parentheses around the assignment to silence this warning | |
if (i = get_char_room_vis(ch, name)) | |
^ | |
( ) | |
handler.c:1671:9: note: use '==' to turn this assignment into an equality comparison | |
if (i = get_char_room_vis(ch, name)) | |
^ | |
== | |
handler.c:1697:11: warning: implicit declaration of function 'CAN_SEE_OBJ' is invalid in C99 [-Wimplicit-function-declaration] | |
if (CAN_SEE_OBJ(ch, i)) { | |
^ | |
handler.c:1740:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (i = get_obj_in_list_vis(ch, name, ch->carrying)) | |
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1740:9: note: place parentheses around the assignment to silence this warning | |
if (i = get_obj_in_list_vis(ch, name, ch->carrying)) | |
^ | |
( ) | |
handler.c:1740:9: note: use '==' to turn this assignment into an equality comparison | |
if (i = get_obj_in_list_vis(ch, name, ch->carrying)) | |
^ | |
== | |
handler.c:1744:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (i = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) | |
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1744:9: note: place parentheses around the assignment to silence this warning | |
if (i = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) | |
^ | |
( ) | |
handler.c:1744:9: note: use '==' to turn this assignment into an equality comparison | |
if (i = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) | |
^ | |
== | |
handler.c:1767:7: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else | |
^ | |
handler.c:1773:7: warning: add explicit braces to avoid dangling else [-Wdangling-else] | |
else | |
^ | |
handler.c:1897:17: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_ch = get_char_room_vis(ch, name)) { | |
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1897:17: note: place parentheses around the assignment to silence this warning | |
if (*tar_ch = get_char_room_vis(ch, name)) { | |
^ | |
( ) | |
handler.c:1897:17: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_ch = get_char_room_vis(ch, name)) { | |
^ | |
== | |
handler.c:1903:17: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_ch = get_char_vis(ch, name)) { | |
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1903:17: note: place parentheses around the assignment to silence this warning | |
if (*tar_ch = get_char_vis(ch, name)) { | |
^ | |
( ) | |
handler.c:1903:17: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_ch = get_char_vis(ch, name)) { | |
^ | |
== | |
handler.c:1921:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_obj = get_obj_vis_accessible(ch, name)) { | |
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1921:20: note: place parentheses around the assignment to silence this warning | |
if (*tar_obj = get_obj_vis_accessible(ch, name)) { | |
^ | |
( ) | |
handler.c:1921:20: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_obj = get_obj_vis_accessible(ch, name)) { | |
^ | |
== | |
handler.c:1925:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_obj = get_obj_in_list_vis(ch, name, ch->carrying)) { | |
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1925:20: note: place parentheses around the assignment to silence this warning | |
if (*tar_obj = get_obj_in_list_vis(ch, name, ch->carrying)) { | |
^ | |
( ) | |
handler.c:1925:20: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_obj = get_obj_in_list_vis(ch, name, ch->carrying)) { | |
^ | |
== | |
handler.c:1932:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_obj = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) { | |
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1932:18: note: place parentheses around the assignment to silence this warning | |
if (*tar_obj = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) { | |
^ | |
( ) | |
handler.c:1932:18: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_obj = get_obj_in_list_vis(ch, name, real_roomp(ch->in_room)->contents)) { | |
^ | |
== | |
handler.c:1938:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | |
if (*tar_obj = get_obj_vis(ch, name)) { | |
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ | |
handler.c:1938:18: note: place parentheses around the assignment to silence this warning | |
if (*tar_obj = get_obj_vis(ch, name)) { | |
^ | |
( ) | |
handler.c:1938:18: note: use '==' to turn this assignment into an equality comparison | |
if (*tar_obj = get_obj_vis(ch, name)) { | |
^ | |
== | |
21 warnings and 1 error generated. | |
make: *** [handler.o] Error 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment