Re: [DG SCRIPTS] search_block incompatible pointer

From: George (greerga@CIRCLEMUD.ORG)
Date: 07/17/98


On Thu, 16 Jul 1998, Bryan Britt wrote:

>gcc -c -g -02 -Wall  dg_wldcmd.c
>dg_wldcmd.c: In function 'do_wdoor':
>dg_wldcmd.c:221: warning: passing arg 2 of 'search_block' from
>incompatible pointer type
>dg_wldcmd.c:226: warning: passing arg 2 of 'search_block' from
>incompatible pointer type

>if ((dir = search_block(direction, (char **)dirs, FALSE)) == -1) {
>    wld_log(room, "wdoor: invalid direction");
>    return;
>}
>
>if ((fd = search_block(field, (char **)door_field, FALSE)) == -1) {
>    wld_log(room, "wdoor: invalid direction");
>    return;
>}

Get rid of the casts and make sure they are 'extern const char
*name_here[]'.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/          | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST