[CODE] Compiling with MSVC5

From: Torgny Bjers (tb@sbbs.se)
Date: 07/04/00


   Server: CircleMUD 3.0, bpl 17
  Add-ons: OasisOLC, Races, Classes
       OS: Windows NT 4.0 Server
 Hardware: Dell Precision 210 Workstation, Dual Processor
 Compiler: Microsoft Developer Studio 97, C++ 5.0


I get warnings when I compile under MSVC5, I have included the warnings from
the compile window as well as the actual code snippet that is causing the
error here, perhaps someone can help out...

Below is the text... Down in the bottom of the mail are snippets from the
files with warnings...

Kind regards,
/Torgny

--------------------Configuration: circle - Win32 Debug--------------------
Compiling...
Command line warning D4002 : ignoring unknown option '/ZI'
Command line warning D4002 : ignoring unknown option '/GZ'
act.comm.c
act.create.c
act.informative.c
act.item.c
act.movement.c
act.offensive.c
act.other.c
act.social.c
act.wizard.c
alias.c
ban.c
boards.c
castle.c
class.c
D:\circle30bpl17\src\class.c(148) : warning C4090: 'function' : different
'const' qualifiers
D:\circle30bpl17\src\class.c(148) : warning C4024: 'do_help' : different
types for formal and actual parameter 2
D:\circle30bpl17\src\class.c(152) : warning C4090: 'function' : different
'const' qualifiers
D:\circle30bpl17\src\class.c(152) : warning C4024: 'do_help' : different
types for formal and actual parameter 2
comm.c
D:\circle30bpl17\src\comm.c(1236) : warning C4028: formal parameter 1
different from declaration
config.c
constants.c
db.c
fight.c
genmob.c
genobj.c
genolc.c
genshp.c
genwld.c
genzon.c
graph.c
handler.c
house.c
improved-edit.c
interpreter.c
limits.c
magic.c
mail.c
medit.c
mobact.c
modify.c
oasis.c
objsave.c
D:\circle30bpl17\src\objsave.c(681) : warning C4101: 'obj' : unreferenced
local variable
oedit.c
olc.c
random.c
redit.c
sedit.c
shop.c
spec_assign.c
spec_procs.c
spell_parser.c
spells.c
tedit.c
utils.c
weather.c
zedit.c
Linking...
Creating browse info file...

circle.exe - 0 error(s), 8 warning(s)
-----------------------------------------------------------------



As for the four warnings in class.c...
----[snip]-------------------------------------------------------
void help_class(struct char_data *ch, int chclass) {
  do_help(ch, pc_class_types[chclass], 0, 0);
}

void help_race(struct char_data *ch, int race) {
  do_help(ch, pc_race_types[race], 0, 0);
}
----[snip]-------------------------------------------------------



As for the warning in comm.c...
----[snip]-------------------------------------------------------
int new_descriptor(int s)
{
  socket_t desc;
  int sockets_connected = 0;
  socklen_t i;
  static int last_desc = 0; /* last descriptor number */
  struct descriptor_data *newd;
  struct sockaddr_in peer;
  struct hostent *from;
[cut]
----[snip]-------------------------------------------------------



and finally, the warning in objsave.c...
----[snip]-------------------------------------------------------
void Crash_extract_norent_eq(struct char_data *ch)
{
  int j;
  struct obj_data *obj;

  for (j = 0; j < NUM_WEARS; j++) {
    if (GET_EQ(ch, j) == NULL)
      continue;

    if (Crash_is_unrentable(GET_EQ(ch, j)))
      obj_to_char(unequip_char(ch, j), ch);
    else
      Crash_extract_norents(GET_EQ(ch, j));
  }
}
----[snip]-------------------------------------------------------


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT