[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Warning statement with no effect.

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Warning statement with no effect.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date Sat 12 Mar 2005 06:38 AM (UTC)  quote  ]
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,

EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #1 on Sat 12 Mar 2005 08:40 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date Reply #2 on Sat 12 Mar 2005 10:18 AM (UTC)  quote  ]
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.

EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
[Go to top] 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.


2,617 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]