diff --git a/src/BranchList.C b/src/BranchList.C index 1900d956c3..6d89551b74 100644 --- a/src/BranchList.C +++ b/src/BranchList.C @@ -11,6 +11,7 @@ #include #include "BranchList.h" +#include using std::string; diff --git a/src/Sectioning.C b/src/Sectioning.C index 42784cc176..64aa202019 100644 --- a/src/Sectioning.C +++ b/src/Sectioning.C @@ -12,6 +12,8 @@ #include "Sectioning.h" +using std::string; + string const & Section::name() const { return name_; diff --git a/src/cursor.C b/src/cursor.C index 276c4f2fc4..b78d054fc4 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -50,6 +50,7 @@ #include #include +#include using lyx::pit_type; diff --git a/src/dimension.h b/src/dimension.h index caee49d253..de5691cb2f 100644 --- a/src/dimension.h +++ b/src/dimension.h @@ -16,7 +16,7 @@ class LyXFont; /// Simple wrapper around three ints -struct Dimension { +class Dimension { public: /// constructor Dimension() : wid(0), asc(0), des(0) {} diff --git a/src/frontends/controllers/ControlMath.C b/src/frontends/controllers/ControlMath.C index dd2260f9e5..4c57f1e6eb 100644 --- a/src/frontends/controllers/ControlMath.C +++ b/src/frontends/controllers/ControlMath.C @@ -18,6 +18,8 @@ #include "support/lstrings.h" #include "support/filetools.h" +#include + using std::string; namespace lyx { diff --git a/src/frontends/qt2/QWrap.C b/src/frontends/qt2/QWrap.C index 64f1d2ad0e..e67ab77f35 100644 --- a/src/frontends/qt2/QWrap.C +++ b/src/frontends/qt2/QWrap.C @@ -89,7 +89,9 @@ namespace { string const numtostr(double val) { string a(convert(val)); +#ifdef WITH_WARNINGS #warning Will this test ever trigger? (Lgb) +#endif if (a == "0") a.erase(); return a; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index f8cae34e8a..a247e0a472 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -41,6 +41,7 @@ #include #include +#include using lyx::graphics::PreviewLoader; diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index d4fa9878dd..b80e783eca 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -15,7 +15,7 @@ #include "insetcommand.h" -struct LaTeXFeatures; +class LaTeXFeatures; /** The url inset */ diff --git a/src/insets/updatableinset.C b/src/insets/updatableinset.C index 5b71e4ef33..eb68e226db 100644 --- a/src/insets/updatableinset.C +++ b/src/insets/updatableinset.C @@ -77,7 +77,9 @@ void UpdatableInset::scroll(BufferView & bv, int offset) const else scx += offset; } else { +#ifdef WITH_WARNINGS #warning metrics? +#endif if (!scx && xo_ + width() < bv.workWidth() - 20) return; if (xo_ - scx + offset + width() < bv.workWidth() - 20) { diff --git a/src/lyxlex_pimpl.C b/src/lyxlex_pimpl.C index af2b2577a4..823d14d7d5 100644 --- a/src/lyxlex_pimpl.C +++ b/src/lyxlex_pimpl.C @@ -20,6 +20,8 @@ #include "support/lyxalgo.h" #include "support/lstrings.h" +#include + using lyx::support::compare_ascii_no_case; using lyx::support::getFormatFromContents; using lyx::support::MakeDisplayPath; diff --git a/src/mathed/math_binaryopinset.C b/src/mathed/math_binaryopinset.C index ce6dc2c5ac..26a4df7fca 100644 --- a/src/mathed/math_binaryopinset.C +++ b/src/mathed/math_binaryopinset.C @@ -12,7 +12,7 @@ #include #include "math_binaryopinset.h" -#include "PainterInfo.h" +#include "metricsinfo.h" #include "support/std_ostream.h" #include "math_support.h" #include "math_mathmlstream.h" @@ -26,7 +26,7 @@ MathBinaryOpInset::MathBinaryOpInset(char op) {} -auto_ptr MathBinaryOpInset::clone() const +std::auto_ptr MathBinaryOpInset::clone() const { return auto_ptr(new MathBinaryOpInset(*this)); } diff --git a/src/mathed/math_xyarrowinset.C b/src/mathed/math_xyarrowinset.C index dab2b5852e..5ff8ef3437 100644 --- a/src/mathed/math_xyarrowinset.C +++ b/src/mathed/math_xyarrowinset.C @@ -11,7 +11,6 @@ #include #include "math_xyarrowinset.h" -#include "math_xymatrixinset.h" #include "math_mathmlstream.h" #include "math_streamstr.h" #include "math_support.h" @@ -27,9 +26,9 @@ MathXYArrowInset::MathXYArrowInset() {} -auto_ptr MathXYArrowInset::clone() const +std::auto_ptr MathXYArrowInset::clone() const { - return auto_ptr(new MathXYArrowInset(*this)); + return std::auto_ptr(new MathXYArrowInset(*this)); } diff --git a/src/output_docbook.C b/src/output_docbook.C index 8c1d0dba60..152ab9d380 100644 --- a/src/output_docbook.C +++ b/src/output_docbook.C @@ -88,7 +88,7 @@ ParagraphList::const_iterator searchEnvironment(ParagraphList::const_iterator co if(p->params().depth() < par->params().depth()) return p; - if( style->latexname() != bstyle->latexname() and p->params().depth() == par->params().depth() ) + if( style->latexname() != bstyle->latexname() && p->params().depth() == par->params().depth() ) return p; } return pend; @@ -132,7 +132,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, // Opening outter tag sgml::openTag(buf, os, runparams, *pbegin); os << '\n'; - if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru) + if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru) os << "latextype == LATEX_ENVIRONMENT and bstyle->pass_thru) + if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru) os << "]]>"; // Closing outter tag diff --git a/src/rowpainter.C b/src/rowpainter.C index b807d3361a..7a6ec164f9 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -515,7 +515,9 @@ void RowPainter::paintFirst() } else { spacing_val = buffer.params().spacing().getValue(); } +#ifdef WITH_WARNINGS #warning Look is this correct? +#endif int const labeladdon = int(font_metrics::maxHeight(font) * layout->spacing.getValue() * spacing_val); int const maxdesc = int(font_metrics::maxDescent(font) * layout->spacing.getValue() * spacing_val) diff --git a/src/sgml.C b/src/sgml.C index 5045025cdc..6e3f732ef7 100644 --- a/src/sgml.C +++ b/src/sgml.C @@ -220,7 +220,7 @@ void openTag(Buffer const & buf, ostream & os, OutputParams const & runparams, P if (param.find('#') != string::npos) { string::size_type pos = param.find("id=<"); string::size_type end = param.find(">"); - if( pos != string::npos and end != string::npos) + if( pos != string::npos && end != string::npos) param.erase(pos, end-pos + 1); } attribute = id + ' ' + param; diff --git a/src/support/gzstream.C b/src/support/gzstream.C index 46796dbd49..0d4e7a753b 100644 --- a/src/support/gzstream.C +++ b/src/support/gzstream.C @@ -18,15 +18,15 @@ // ============================================================================ // // File : gzstream.C -// Revision : $Revision: 1.2 $ -// Revision_date : $Date: 2003/09/09 18:27:24 $ +// Revision : $Revision: 1.3 $ +// Revision_date : $Date: 2005/01/18 14:15:57 $ // Author(s) : Deepak Bandyopadhyay, Lutz Kettner // // Standard streambuf implementation following Nicolai Josuttis, "The // Standard C++ Library". // ============================================================================ -#include +#include "gzstream.h" #include #include // for memcpy