05 Aug, 2011, Terraco wrote in the 1st comment:
Votes: 0
I just started my mud again. After I got it on the hosts system I did a make clean. and got the following

I just started my mud again. After I got it on the hosts system I did a make clean. and got the following

[[size=5][b]ALL BROKEN OR WARNING CODES ARE NUMBERED[/b][/size]


comm.c: In function `init_descriptor':
comm.c:948: warning: passing arg 3 of `getsockname' from incompatible pointer type
comm.c:949: warning: passing arg 3 of `accept' from incompatible pointer type
comm.c:985: warning: passing arg 3 of `getpeername' from incompatible pointer type
[code]
947 size = sizeof (sock);
948 getsockname (control, (struct sockaddr *) &sock, &size);
949 if ((desc = accept (control, (struct sockaddr *) &sock, &size)) < 0)
950 {
951 perror ("New_descriptor: accept");
952 return;

984 size = sizeof (sock);
985 if (getpeername (desc, (struct sockaddr *) &sock, &size) < 0)
986 {
987 perror ("New_descriptor: getpeername");
988 dnew->host = str_dup ("(unknown)");
989 }
[/code]


db.c: In function `do_dump':
db.c:3368: warning: int format, different type arg (arg 4)
db.c:3386: warning: int format, different type arg (arg 4)
db.c:3386: warning: int format, different type arg (arg 6)
db.c:3395: warning: int format, different type arg (arg 4)
db.c:3395: warning: int format, different type arg (arg 6)
db.c:3406: warning: int format, different type arg (arg 4)
db.c:3406: warning: int format, different type arg (arg 6)
db.c:3418: warning: int format, different type arg (arg 4)
db.c:3435: warning: int format, different type arg (arg 4)
db.c:3435: warning: int format, different type arg (arg 6)
db.c:3444: warning: int format, different type arg (arg 4)
db.c:3444: warning: int format, different type arg (arg 6)
db.c:3448: warning: int format, different type arg (arg 4)
db.c:3452: warning: int format, different type arg (arg 4)
[code]
/* mobile prototypes */
fprintf (fp, "MobProt %4d (%8d bytes)\n",
3386 top_mob_index, top_mob_index * (sizeof (*pMobIndex)));

/* mobs */
count = 0;
count2 = 0;
for (fch = char_list; fch != NULL; fch = fch->next)
{
count++;
if (fch->pcdata != NULL)
num_pcs++;
for (af = fch->affected; af != NULL; af = af->next)
aff_count++;
}
for (fch = char_free; fch != NULL; fch = fch->next)
count2++;

fprintf (fp, "Mobs %4d (%8d bytes), %2d free (%d bytes)\n",
count, count * (sizeof (*fch)), count2,
3386 count2 * (sizeof (*fch)));

/* pcdata */
count = 0;
for (pc = pcdata_free; pc != NULL; pc = pc->next)
count++;

fprintf (fp, "Pcdata %4d (%8d bytes), %2d free (%d bytes)\n",
num_pcs, num_pcs * (sizeof (*pc)), count,
3395 count * (sizeof (*pc)));

/* descriptors */
count = 0;
count2 = 0;
for (d = descriptor_list; d != NULL; d = d->next)
count++;
for (d = descriptor_free; d != NULL; d = d->next)
count2++;

fprintf (fp, "Descs %4d (%8d bytes), %2d free (%d bytes)\n",
3406 count, count * (sizeof (*d)), count2, count2 * (sizeof (*d)));

/* object prototypes */
for (vnum = 0; nMatch < top_obj_index; vnum++)
if ((pObjIndex = get_obj_index (vnum)) != NULL)
{
for (af = pObjIndex->affected; af != NULL; af = af->next)
aff_count++;
nMatch++;
}

fprintf (fp, "ObjProt %4d (%8d bytes)\n",
3418 top_obj_index, top_obj_index * (sizeof (*pObjIndex)));


/* objects */
count = 0;
count2 = 0;
for (obj = object_list; obj != NULL; obj = obj->next)
{
count++;
for (af = obj->affected; af != NULL; af = af->next)
aff_count++;
}
for (obj = obj_free; obj != NULL; obj = obj->next)
count2++;

fprintf (fp, "Objs %4d (%8d bytes), %2d free (%d bytes)\n",
count, count * (sizeof (*obj)), count2,
3435 count2 * (sizeof (*obj)));

/* affects */
count = 0;
for (af = affect_free; af != NULL; af = af->next)
count++;

fprintf (fp, "Affects %4d (%8d bytes), %2d free (%d bytes)\n",
aff_count, aff_count * (sizeof (*af)), count,
3444 count * (sizeof (*af)));

/* rooms */
fprintf (fp, "Rooms %4d (%8d bytes)\n",
3448 top_room, top_room * (sizeof (*room)));

/* exits */
fprintf (fp, "Exits %4d (%8d bytes)\n",
3452 top_exit, top_exit * (sizeof (*exit)));

fclose (fp);
[/code]

string.c:649: error: conflicting types for 'getline'
/usr/include/stdio.h:653: error: previous declaration of 'getline' was here
string.c:649: error: conflicting types for 'getline'
/usr/include/stdio.h:653: error: previous declaration of 'getline' was here
make: *** [obj/string.o] Error 1
[code]
647 /* buf queda con la line sin \n\r */
648 char *getline (char *str, char *buf)
649 {
int tmp = 0;
bool found = FALSE;

653 while (*str)
{
if (*str == '\n')
{
found = TRUE;
break;
}

buf[tmp++] = *(str++);
}

if (found)
{
if (*(str + 1) == '\r')
str += 2;
else
str += 1;
} /* para que quedemos en el inicio de la prox linea */

buf[tmp] = '\0';

return str;
}
[/code]
(I don't know Spanish either heh)
I also don't have a file called <stdio.h> that I have noticed

I am not sure what happened to the games info but it wasnt running on anything

Any help you all can offer is most appreciated
05 Aug, 2011, Tijer wrote in the 2nd comment:
Votes: 0
To fix the one in new_descriptor in comm.c

change
int size;


to
socklen_t size;


and

size = sizeof(sock);


to

size = (socklen_t)sizeof(sock);
05 Aug, 2011, Exodus wrote in the 3rd comment:
Votes: 0
stdio.h is most likely in your include directory, /usr/include/
It appears as though that library didn't exist or wasn't linked when that code was originally written. I haven't compared your getline() function with the one included in the library, but I'm sure it would be safe to assume that using the one from the library is usually better as a rule of thumb. Comment the getline() function out of string.c and that should fix those errors.

As for the do_dump() function, you have something like
top_mob_index * (sizeof (*pMobIndex))


Make sure the types for top_mob_index and the pMobIndex array are the same, by either changing top_mob_index's declaration or doing a typecast inline. It's complaining about those types of things because the value for arg3 is being multiplied by the size (in bytes) of arg4. If pMobIndex isn't an integer of some type that arithmetic can be performed on in that way, you'll get errors.
05 Aug, 2011, Vigud wrote in the 4th comment:
Votes: 0
Try using clang, it is much more verbose.
06 Aug, 2011, Terraco wrote in the 5th comment:
Votes: 0
Hey got most the errors above fixed now I am just running into:

In file included from string.c:25:
merc.h:2355: error: syntax error before '*' token
merc.h:2355: warning: type defaults to `int' in declaration of `fpReserve'
merc.h:2355: warning: data definition has no type or storage class
merc.h:2587: error: syntax error before '*' token
merc.h:2588: error: syntax error before '*' token
merc.h:2589: error: syntax error before '*' token
merc.h:2590: error: syntax error before '*' token
merc.h:2591: error: syntax error before '*' token
merc.h:2592: error: syntax error before '*' token
merc.h:2593: error: syntax error before '*' token
string.c: In function `string_add':
string.c:168: warning: implicit declaration of function `sprintf'
make: *** [obj/string.o] Error 1

2355  extern  FILE			*	fpReserve;
2587 char fread_letter args( ( FILE *fp ) );
2588 int fread_number args( ( FILE *fp ) );
2589 long fread_flag args( ( FILE *fp ) );
2590 char * fread_string args( ( FILE *fp ) );
2591 char * fread_string_eol args( ( FILE *fp ) );
2592 void fread_to_eol args( ( FILE *fp ) );
2593 void * alloc_mem args( ( int sMem ) );

we cant figure out the fix for these, I have checked into merc.h and string.c but nothing seems outta place.
07 Aug, 2011, David Haley wrote in the 6th comment:
Votes: 0
Looks like you're missing the include file that declares FILE; try stdio.h although I don't remember which one it is exactly. Maybe file.h.
07 Aug, 2011, Vigud wrote in the 7th comment:
Votes: 0
FILE is declared in <stdio.h>.
0.0/7