From: Abdelrazak Younes Date: Wed, 30 Sep 2009 13:50:07 +0000 (+0000) Subject: Fix gcc4.4 warnings. X-Git-Tag: 2.0.0~5435 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=da47dc051e9ceb385b783424a86a21695657c811;p=features.git Fix gcc4.4 warnings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31485 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 3f35b90ee5..46b3e079b4 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1865,8 +1865,9 @@ bool BufferView::dispatch(FuncRequest const & cmd) break; } // put cursor in front of inset. - if (!setCursorFromInset(inset)) + if (!setCursorFromInset(inset)) { LASSERT(false, break); + } // useful if we are called from a dialog. cur.beginUndoGroup(); cur.recordUndo(); diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 178e571a64..402b2c3119 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -958,8 +958,8 @@ vector wrapToVec(docstring const & str, int ind, vector retval; while (s.size() > width) { // find the last space within the first 'width' chars - int i = s.find_last_of(' ', width - 1); - if (i == docstring::npos || i <= ind) { + size_t i = s.find_last_of(' ', width - 1); + if (i == docstring::npos || i <= size_t(ind)) { // no space found s = s.substr(0, width - 3) + "..."; break;