From 8f79d200a0c20c1840f8f8fa9862c4f84ce72135 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 28 Oct 2010 21:47:01 +0000 Subject: Fixed the remaining warnings git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7767 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/demo.cxx | 7 +++++-- test/navigation.cxx | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/demo.cxx b/test/demo.cxx index 01a320598..e4e2383a6 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -417,7 +417,7 @@ void dobut(Fl_Widget *, long arg) char* command = new char[icommand_length+5]; // 5 for extra './' and ' &\0' sprintf(command, "./%s &", menus[men].icommand[bn]); - system(command); + if (system(command)==-1) { /* ignore */ } delete[] command; #endif // WIN32 @@ -518,7 +518,10 @@ int main(int argc, char **argv) { if (buf!=fname) strcpy(buf,fname); const char *c = fl_filename_name(buf); - if (c > buf) {buf[c-buf] = 0; chdir(buf);} + if (c > buf) { + buf[c-buf] = 0; + if (chdir(buf)==-1) { /* ignore */ } + } push_menu("@main"); form->show(argc,argv); Fl::run(); diff --git a/test/navigation.cxx b/test/navigation.cxx index eb0959575..c1ac72091 100644 --- a/test/navigation.cxx +++ b/test/navigation.cxx @@ -57,8 +57,7 @@ int main(int argc, char **argv) { Fl_Widget *o = window.child(n); if (xx()+o->w() && x+w>o->x() && yy()+o->h() && y+h>o->y()) break; - if ( (!j && (y < o->y()) - || (y == o->y() && x < o->x())) ) j = o; + if ( !j && ( yy() || (y==o->y() && xx()) ) ) j = o; } // skip if intersection: if (n < window.children()) continue; -- cgit v1.2.3