From 2aa786c65225add27f3157a6e77faf728405e9ef Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 29 Dec 2004 11:39:17 +0000 Subject: [PATCH] fix some compiler warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9409 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 7 +++++++ src/cursor.C | 1 - src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/bmtable.c | 4 ++-- src/insets/ChangeLog | 4 ++++ src/insets/insettext.C | 1 - src/paragraph.C | 1 - src/text2.C | 4 +--- 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c1692f59cb..8536463be9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2004-12-28 Jean-Marc Lasgouttes + * text2.C (setLayout): remove unused variable endpit. + (deleteEmptyParagraphMechanism): remove unused variable tmpcursor. + + * paragraph.C (onlyText): remove unused variable style. + + * cursor.C (bruteFind): remove unused variables beg and end. + * Makefile.am (dist_noinset_DATA): not needed anymore * cheaders/*: remove. diff --git a/src/cursor.C b/src/cursor.C index 83d42e8d0e..0be9a32632 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -120,7 +120,6 @@ namespace { int x, int y, int xlow, int xhigh, int ylow, int yhigh) { BOOST_ASSERT(!cursor.empty()); - pit_type beg, end; CursorSlice bottom = cursor[0]; LyXText * text = bottom.text(); BOOST_ASSERT(text); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 64a16a188e..dffed69747 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2004-12-28 Jean-Marc Lasgouttes + + * bmtable.c (fl_set_bmtable_pixmap_data): + (fl_set_bmtable_pixmap_file): remove incomplete (and useless) + initializer for XpmAttributes + 2004-12-28 Jürgen Spitzmüller * FormGraphics.C: store all values as strings. diff --git a/src/frontends/xforms/bmtable.c b/src/frontends/xforms/bmtable.c index 241a415fb7..0a0e7483a7 100644 --- a/src/frontends/xforms/bmtable.c +++ b/src/frontends/xforms/bmtable.c @@ -250,7 +250,7 @@ void fl_set_bmtable_pixmap_data(FL_OBJECT * ob, int nx, int ny, BMTABLE_SPEC * sp = (BMTABLE_SPEC *)ob->spec; if (sp) { Pixmap dummy_shapemask = 0; - XpmAttributes dumb_attributes = { 0 }; + XpmAttributes dumb_attributes; sp->nx = nx; sp->ny = ny; sp->bx = FL_abs(ob->bw); @@ -314,7 +314,7 @@ void fl_set_bmtable_pixmap_file(FL_OBJECT *ob, int nx, int ny, char const *filen BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec; if (sp) { Pixmap dummy_shapemask = 0; - XpmAttributes dumb_attributes = { 0 }; + XpmAttributes dumb_attributes; XpmColorSymbol xpm_col; sp->nx = nx; sp->ny = ny; diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index c1cb9653f3..51ae27b11d 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2004-12-28 Jean-Marc Lasgouttes + + * insettext.C (doDispatch): remove unused variable was_empty + 2004-12-28 Jürgen Spitzmüller * insetgraphics.C: diff --git a/src/insets/insettext.C b/src/insets/insettext.C index fdb2c5611a..a402cbb526 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -296,7 +296,6 @@ void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd) //lyxerr << "InsetText::doDispatch: " << cmd.action << " " << endl; setViewCache(&cur.bv()); - bool was_empty = paragraphs().begin()->empty() && paragraphs().size() == 1; text_.dispatch(cur, cmd); } diff --git a/src/paragraph.C b/src/paragraph.C index a2d4a52f35..b33ebcfdd9 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -1383,7 +1383,6 @@ pos_type Paragraph::getFirstWord(Buffer const & buf, ostream & os, OutputParams bool Paragraph::onlyText(Buffer const & buf, LyXFont const & outerfont, pos_type initial) const { - LyXLayout_ptr const & style = layout(); LyXFont font_old; for (pos_type i = initial; i < size(); ++i) { diff --git a/src/text2.C b/src/text2.C index 55f9d4e1ad..44e897db0f 100644 --- a/src/text2.C +++ b/src/text2.C @@ -336,7 +336,7 @@ void LyXText::setLayout(LCursor & cur, string const & layout) pit_type start = cur.selBegin().pit(); pit_type end = cur.selEnd().pit() + 1; - pit_type endpit = setLayout(start, end, layout); + setLayout(start, end, layout); updateCounters(); } @@ -1423,8 +1423,6 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor const & old) if (oldpar.empty() || (oldpar.size() == 1 && oldpar.isLineSeparator(0))) { // ok, we will delete something - CursorSlice tmpcursor; - deleted = true; bool selection_position_was_oldcursor_position = -- 2.39.5