Login
User Name:

Password:



Register

Forgot your password?
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
Array out of bounds ?
Jan 16, 2025 4:48 am
By Remcon
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
AFKMud 2.5.1
Author: AFKMud Team
Submitted by: Samson
Kayle's Weather Code for AFKMud
Author: Kayle
Submitted by: Samson
AFKMud 2.5.0
Author: AFKMud Team
Submitted by: Samson
SWFotEFUSS 1.5.2
Author: Various
Submitted by: Samson
Users Online
Anthropic, AhrefsBot, Meta, Sogou, Bing

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
503
3,811
19,714
589
xhuul

» 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,992
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,992
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 >>