
Pages:<< prev 1 next >>



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.



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...



Sorcerer

GroupMembers
Posts600
JoinedDec 3, 2008
So how do I get it to shut up.



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...



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 >>