Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Yesterday, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Bing, Yahoo!, Google

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » backup snippets.
Forum Rules | Mark all | Recent Posts

backup snippets.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 27, 2009, 10:42 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

I added it in, and it seems the gcc doesn't like it....

backup.c: In function 'backup':
backup.c:109: warning: ignoring return value of 'system', declared with attribute warn_unused_result
backup.c:113: warning: ignoring return value of 'system', declared with attribute warn_unused_result

        system( cmd );


is what it is complaining about.
       
Post is unread #2 Sep 28, 2009, 3:15 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

It is just saying that system is returning an int and you aren't using it to check for errors etc...
       
Post is unread #3 Sep 28, 2009, 12:44 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

So how do I get it to shut up.
       
Post is unread #4 Sep 28, 2009, 12:52 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

well you can add an int sysret; and then change the system( cmd ); to sysret = system( cmd ); that should shut it up, you could also read up on actually checking to make sure it didn't return an error etc...
       
Post is unread #5 Sep 28, 2009, 1:03 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 2008

Thanks, funny thing is you told me how to fix this kind of warning before when I was upating the mud to run under the new gcc... I shoul have remembered.

Everything works, and I don't see any errors. Tested the command it it works fine.
       
Pages:<< prev 1 next >>