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
➜ SMAUG coding
➜ Warning statement with no effect.
Warning statement with no effect.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Sat 12 Mar 2005 06:38 AM (UTC) |
Message
| After un-remarking the Wflags in my makefile(dont know who did that(or should that be when)) i found i had a multitude of warnings for differing things.
Most of these were just silly re-declerations and unused variables and a nifty little one i found in sscanf where it needed a %lu to like the long ints that were being thrown at it. Babbling yes, getting to the point, Now.
I have cleaned out all but one warning and thats this line of code in comm.c in nanny
(d);
Which just so happens to return Warning statement with no effect. I dont know how to remove this warning or what the cause is, tho im about to look it up on the net and find out more about this warning.
Any help in rectifying and or an explanation about this warning would be great.
Thanks in advance, |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Sat 12 Mar 2005 08:40 AM (UTC) |
Message
| The cause is quite simple. It means just what it says: you (or whoever) entered a statement that has no effect. It's like typing:
int i = 2;
i; // statement with no effect
The way to fix this is to simply get rid of the statement. Make sure the statement has no side-effects before doing that. (But chances are, if gcc reported it as having no side-effects, it has no side-effects.) If d is just a variable defined in a function, you should be fine. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Reply #2 on Sat 12 Mar 2005 10:18 AM (UTC) |
Message
| Somehow along the way, the call to show_title was removed and all that remained was (d);, dont know how this happened at all. I think its time i learned how to use cvs and track all the changes that i make, and to never remark things out of the makefile. |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | 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.
13,204 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top