Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Bringing Smaug1.4a to gcc v4.2.4 standards
Bringing Smaug1.4a to gcc v4.2.4 standards
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rash
United Kingdom (56 posts) Bio
|
Date
| Thu 04 Feb 2010 06:02 PM (UTC) |
Message
| I'm not quite sure if this should fall under Compiling or Coding but since it's compile errors and relates to gcc v4.2.4 I thought here may be best.
Here's some of the error's (There is quite a few). This set is just from comm.c
gcc -c -g3 -Wall -Ddwc -DTIMEFORMAT comm.c
comm.c: In function turn_on_mxp:
comm.c:364: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c: In function new_descriptor:
comm.c:863: warning: pointer targets in passing argument 3 of accept differ in signedness
comm.c: In function read_from_buffer:
comm.c:1206: warning: pointer targets in assignment differ in signedness
comm.c:1209: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1213: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1213: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1213: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1216: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1220: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1220: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c:1220: warning: pointer targets in passing argument 1 of strlen differ in signedness
comm.c: In function flush_buffer:
comm.c:1369: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c: In function nanny:
comm.c:1849: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:1883: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:1941: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2075: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2086: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2101: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2117: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2135: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2152: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2172: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2192: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
comm.c:2669: warning: pointer targets in passing argument 2 of write_to_buffer differ in signedness
Here's Line 364-372. Line pointed to is in Bold.
/* set up MXP */
void turn_on_mxp (DESCRIPTOR_DATA *d)
{
d->mxp = TRUE; /* turn it on now */
write_to_buffer( d, start_mxp_str, 0 );
write_to_buffer( d, MXPMODE (6), 0 ); /* permanent secure mode */
write_to_buffer( d, MXPTAG ("!-- Set up MXP elements --"), 0);
/* Exit tag */
write_to_buffer( d, MXPTAG ("!ELEMENT Ex '<send>' FLAG=RoomExit"), 0);
/* Room Set Up tag ===== - Rash */
write_to_buffer( d, MXPTAG ("!ELEMENT rl '<send>' FLAG=RoomLine"), 0);
/* Room description tag */
write_to_buffer( d, MXPTAG ("!ELEMENT rdesc '<p>' FLAG=RoomDesc"), 0);
Here's lines 860-871. Line pointed to is in Bold.
void new_descriptor( int new_desc )
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA *dnew;
struct sockaddr_in sock;
struct hostent *from;
int desc;
int size;
char bugbuf[MAX_STRING_LENGTH];
#ifdef WIN32
unsigned long arg = 1;
#endif
There's two to start. Perhaps someone can link me to a document on just how much stricter gcc v4 now is or something that may help?
Thanks, Rash | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Thu 04 Feb 2010 06:37 PM (UTC) |
Message
|
Quote: write_to_buffer( d, start_mxp_str, 0 );
This one is easy enough, the warning is telling you that the function expects signed or unsigned char* whereas you're giving it the opposite. I.e., it takes signed and you're giving it unsigned, or it takes unsigned and you're giving it signed.
Quote: DESCRIPTOR_DATA *dnew;
This cannot be the right line because the warning message refers to a call to 'accept' but clearly there is none here.
The line numbers can get confused if your file mixes Unix and Windows line endings; try running 'dos2unix' on the file in question to see if that fixes the line numbers. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Thu 04 Feb 2010 08:00 PM (UTC) |
Message
| Are you using SmaugFUSS? That fixes a lot of bugs and compiles under gcc 4. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,106 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top