backup snippets.
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Sep 28, 2009 12:42 am
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
is what it is complaining about.
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.
#2 Sep 28, 2009 5:15 am
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...
#3 Sep 28, 2009 2:44 pm
Sorcerer
GroupMembers
Posts600
JoinedDec 3, 2008
So how do I get it to shut up.
#4 Sep 28, 2009 2:52 pm
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...
#5 Sep 28, 2009 3:03 pm
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.
Everything works, and I don't see any errors. Tested the command it it works fine.
Pages:<< prev 1 next >>