Re: Question on arg format after bitvector_t change in genshp.c

From: Thomas Arp (t_arp@stofanet.dk)
Date: 07/11/02


From: "Mathew Earle Reuther" <graymere@zipcon.net>
> Here's the save code from genshp.c:
>
>       fprintf(shop_file,                       <--- arg 1
>               "%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n"
>               "%d\n%ld\n%d\n%d\n",             <--- arg 2
>               S_NOITEM1(shop) ? S_NOITEM1(shop) : "%s Ke?!",
>               S_NOITEM2(shop) ? S_NOITEM2(shop) : "%s Ke?!",
>               S_NOBUY(shop) ? S_NOBUY(shop) : "%s Ke?!",
>               S_NOCASH1(shop) ? S_NOCASH1(shop) : "%s Ke?!",
>               S_NOCASH2(shop) ? S_NOCASH2(shop) : "%s Ke?!",
>               S_BUY(shop) ? S_BUY(shop) : "%s Ke?! %d?",
>               S_SELL(shop) ? S_SELL(shop) : "%s Ke?! %d?",
>               S_BROKE_TEMPER(shop),
>               S_BITVECTOR(shop),               <--- arg 11
>               mob_index[S_KEEPER(shop)].vnum,
>               S_NOTRADE(shop)
>               );
>
> I'm getting this compile warning:
>
> genshp.c: In function `save_shops':
> genshp.c:484: warning: long int format, different type arg (arg 11)

As you see, the 11th argument is the shop bitvector, and I figure you
changed that to a long long.

Change the format to
               "%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n%s~\n"
               "%d\n%ull\n%d\n%d\n",

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT