From 12ac7f339e14c4f76a24f45a21c0697303099145 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 29 Apr 2004 14:49:02 +0000 Subject: [PATCH] Ensure all #warning statements are wrapped by #ifdef WITH_WARNINGS. Jean-Marc this is HEAD, not 1.3.x. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8711 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 8 ++++++++ src/cursor.C | 4 ++++ src/factory.C | 2 ++ src/mathed/ChangeLog | 7 +++++++ src/mathed/math_hullinset.C | 2 ++ src/mathed/math_kerninset.C | 2 ++ src/mathed/math_nestinset.C | 2 ++ src/pariterator.C | 2 ++ src/text2.C | 4 ++++ 9 files changed, 33 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 54cb96c300..fd0d4759e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2004-04-29 Angus Leeming + + * cursor.C: + * factory.C: + * pariterator.C: + * text2.C: wrap a bunch of #warning statements + inside #ifdef WITH_WARNINGS blocks. + 2004-04-29 Georg Baum * buffer.C: increment format to 233. diff --git a/src/cursor.C b/src/cursor.C index 0339843e9d..dcefbe3181 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -326,7 +326,9 @@ void LCursor::setSelection() { selection() = true; // a selection with no contents is not a selection +#ifdef WITH_WARNINGS #warning doesnt look ok +#endif if (par() == anchor().par() && pos() == anchor().pos()) selection() = false; } @@ -385,7 +387,9 @@ void LCursor::selHandle(bool sel) { //lyxerr << "LCursor::selHandle" << endl; if (sel == selection()) { +#ifdef WITH_WARNINGS #warning Alfredo: This is too strong (Andre) +#endif //if (!sel) // noUpdate(); return; diff --git a/src/factory.C b/src/factory.C index 42a61848c4..8d3b9b6ac1 100644 --- a/src/factory.C +++ b/src/factory.C @@ -470,7 +470,9 @@ InsetBase * readInset(LyXLex & lex, Buffer const & buf) inset->read(buf, lex); +#ifdef WITH_WARNINGS #warning hack.. +#endif if (inset->lyxCode() == InsetBase::MATHMACRO_CODE) { MathMacroTemplate const * tmpl = static_cast(inset.get()); diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index fb5a0ddcd0..6b7aa193b8 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,10 @@ +2004-04-29 Angus Leeming + + * math_hullinset.C: + * math_kerninset.C: + * math_nestinset.C: wrap a bunch of #warning statements + inside #ifdef WITH_WARNINGS blocks. + 2004-04-20 Angus Leeming * math_nestinset.C (notifyCursorLeaves): squash warning about diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index 0a54cc8779..7c5327650e 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -1154,7 +1154,9 @@ InsetBase::Code MathHullInset::lyxCode() const bool MathHullInset::searchForward(BufferView * bv, string const & str, bool, bool) { +#ifdef WITH_WARNINGS #warning completely broken +#endif static MathHullInset * lastformula = 0; static CursorBase current = DocIterator(ibegin(nucleus())); static MathArray ar; diff --git a/src/mathed/math_kerninset.C b/src/mathed/math_kerninset.C index fa288ad55d..a7ac65c906 100644 --- a/src/mathed/math_kerninset.C +++ b/src/mathed/math_kerninset.C @@ -54,7 +54,9 @@ void MathKernInset::draw(PainterInfo &, int, int) const void MathKernInset::write(WriteStream & os) const { +#ifdef WITH_WARNINGS #warning this crashs on startup! +#endif //os << "\\kern" << wid_.asLatexString() << ' '; os << "\\kern0mm "; } diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 664fb09f04..9f501423e9 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -315,7 +315,9 @@ int MathNestInset::latex(Buffer const &, std::ostream & os, void MathNestInset::notifyCursorLeaves(LCursor & /*cur*/) { +#ifdef WITH_WARNINGS #warning look here +#endif #if 0 MathArray & ar = cur.cell(); // remove base-only "scripts" diff --git a/src/pariterator.C b/src/pariterator.C index f38f440a4b..8d6fe92056 100644 --- a/src/pariterator.C +++ b/src/pariterator.C @@ -166,7 +166,9 @@ bool operator!=(ParConstIterator const & iter1, ParConstIterator const & iter2) } +#ifdef WITH_WARNINGS #warning const correctness! +#endif ParConstIterator par_const_iterator_begin(InsetBase const & inset) { diff --git a/src/text2.C b/src/text2.C index 36b40e3bc7..f2480b9adb 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1342,7 +1342,9 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor const & old) #endif // correct all cursor parts fixCursorAfterDelete(cur.top(), old.top()); +#ifdef WITH_WARNINGS #warning DEPM, look here +#endif //fixCursorAfterDelete(cur.anchor(), old.top()); return false; } @@ -1385,7 +1387,9 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor const & old) // such events. Maybe even signal/slot? if (cur.par() > old.par()) --cur.par(); +#ifdef WITH_WARNINGS #warning DEPM, look here +#endif // if (cur.anchor().par() > old.par()) // --cur.anchor().par(); -- 2.39.5