Skip to content

Commit

Permalink
Fix compilation warnings and fixes compilation for Ubuntu 10.04 release
Browse files Browse the repository at this point in the history
  • Loading branch information
anjos committed Apr 15, 2012
1 parent e480880 commit 8d25497
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
17 changes: 15 additions & 2 deletions cxx/daq/src/QtDisplay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <boost/format.hpp>
#include "core/logging.h"
#include "daq/QtDisplay.h"

namespace bob { namespace daq {
Expand Down Expand Up @@ -85,7 +88,12 @@ void QtDisplay::start() {

isRecording = false;
if (!onStopRecording.empty()) {
system(onStopRecording.c_str());
int status = system(onStopRecording.c_str());
if (status) {
boost::format m("stop of recording command '%s' exited with status %d (!=0)");
m % onStartRecording.c_str() % status;
bob::core::warn << m.str() << std::endl;
}
}
}

Expand Down Expand Up @@ -137,7 +145,12 @@ void QtDisplay::paintEvent(QPaintEvent* event) {

if (status.isRecording) {
if (!onStartRecording.empty()) {
system(onStartRecording.c_str());
int status = system(onStartRecording.c_str());
if (status) {
boost::format m("start of recording command '%s' exited with status %d (!=0)");
m % onStartRecording.c_str() % status;
bob::core::warn << m.str() << std::endl;
}
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion cxx/daq/src/SimpleController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <sys/time.h>

#include <cstdio>
#include <cstring>

#include <cstdio>
#include <Magick++/Blob.h>
#include <Magick++/Image.h>

Expand Down Expand Up @@ -108,6 +108,10 @@ static void yuyvToRgb24(unsigned char* dst , const unsigned char* src , const in
}
}

/**
* This method is currently unused, so it was commented out of the code
*/
/**
static void yuyvToBgr24(unsigned char* dst , const unsigned char* src , const int width, const int height) {
unsigned char *s;
unsigned char *d;
Expand Down Expand Up @@ -151,6 +155,7 @@ static void yuyvToBgr24(unsigned char* dst , const unsigned char* src , const in
}
}
}
**/

// JPEG Header to convert MJPEG to JPEG
// See http://alexmogurenko.com/blog/programming/mjpeg-to-jpeg-cpp-csharp-delphi/
Expand Down

0 comments on commit 8d25497

Please sign in to comment.