Login
User Name:

Password:



Register

Forgot your password?
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
Users Online
Bing, Google, AhrefsBot

Members: 0
Guests: 38
Stats
Files
Topics
Posts
Members
Newest Member
488
3,789
19,632
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » 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 28, 2009 12:42 am   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 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 5:15 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,914
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 2:44 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008

 
So how do I get it to shut up.

Post is unread #4 Sep 28, 2009 2:52 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,914
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 3:03 pm   
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 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 >>