From 744c845a05cf94af06b7ca0c2fcbf6c2200acce0 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Sat, 27 Mar 2004 18:50:49 +0000 Subject: [PATCH] Squash a couple of warnings, one at compile time and one at run time. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8550 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 7 +++++++ src/support/forkedcontr.C | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 62b825b661..0ac54d349a 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,10 @@ +2004-03-27 Angus Leeming + + * forkedcontr.C (child_handler): squash warning about a + signed/unsigned comparison. + (handleCompletedProcesses): only output a warning about an error + waiting for the child if it is indeed an error ;-) + 2004-03-26 Angus Leeming * forkedcall.[Ch] (run): new function, replacing runBlocking, diff --git a/src/support/forkedcontr.C b/src/support/forkedcontr.C index a8074729a9..a3aa0ffd9e 100644 --- a/src/support/forkedcontr.C +++ b/src/support/forkedcontr.C @@ -165,7 +165,8 @@ void child_handler(int) ForkedcallsController & fcc = ForkedcallsController::get(); // Be safe - if (fcc.current_child+1 >= fcc.reaped_children.size()) + typedef vector::size_type size_type; + if (size_type(fcc.current_child + 1) >= fcc.reaped_children.size()) return; ForkedcallsController::Data & store = @@ -260,8 +261,11 @@ void ForkedcallsController::handleCompletedProcesses() Data & store = reaped_children[i]; if (store.pid == -1) { - lyxerr << "LyX: Error waiting for child: " - << strerror(errno) << endl; + // Might happen perfectly innocently, eg as a result + // of the system (3) call. + if (errno) + lyxerr << "LyX: Error waiting for child: " + << strerror(errno) << endl; continue; } -- 2.39.5