Skip to content
Snippets Groups Projects
Commit d0143b4e authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #3942: Fixed warning: ignoring return value of ‘foo()’, declared with...

Task #3942: Fixed warning: ignoring return value of ‘foo()’, declared with attribute warn_unused_result [-Wunused-result]
parent 9b584725
No related branches found
No related tags found
No related merge requests found
......@@ -562,7 +562,6 @@ void SoftwareMonitor::_buildProcessMap()
DIR* procDir = opendir("/proc");
ASSERTSTR(procDir, "Cannot open directory /proc to check programlist");
chdir("/proc");
struct dirent* dirPtr;
while ((dirPtr = readdir(procDir))) {
......@@ -680,7 +679,9 @@ void SoftwareMonitor::_restartProgram(const string& procName)
}
LOG_WARN_STR("Trying to restart program " << procName);
system (formatString("swlevel -r %s", procName.c_str()).c_str());
if (system (formatString("swlevel -r %s", procName.c_str()).c_str()) != 0) {
LOG_ERROR_STR("Failed to restart program" << procName);
}
}
......
......@@ -406,6 +406,7 @@ void gnuplot_plot_x(
{
int i ;
int tmpfd ;
int retval;
char name[128] ;
char cmd[GP_CMD_SIZE] ;
char line[GP_CMD_SIZE] ;
......@@ -434,7 +435,8 @@ void gnuplot_plot_x(
/* Write data to this file */
for (i=0 ; i<n ; i++) {
snprintf(line, sizeof line, "%g\n", d[i]);
write(tmpfd, line, strlen(line));
retval=write(tmpfd, line, strlen(line));
(void)retval;
}
close(tmpfd) ;
......
......@@ -253,7 +253,8 @@ GCFEvent::TResult BeamControl::initial_state(GCFEvent& event,
itsParentControl->activateObservationTimers(msg.cntlrName, startTime, stopTime);
LOG_INFO ("Killing running beamctl's if any");
system ("killall beamctl");
int retval = system ("killall beamctl");
(void)retval;
LOG_INFO ("Going to started state");
TRAN(BeamControl::started_state); // go to next state.
......
......@@ -552,7 +552,9 @@ void ControllerMenu::_doStartMenu()
cout << "Its name has the format " << LOFAR_SHARE_LOCATION
<< "/Observation<nr>." << endl;
string command("ls -1 " LOFAR_SHARE_LOCATION "/Observation[0-9]*");
system(command.c_str());
if (system(command.c_str()) != 0) {
cout << "Command '" << command << "' failed!" << endl;
}
int32 obsnr(-1);
while (obsnr < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment