]> git.lyx.org Git - lyx.git/commitdiff
Squash a bunch of warnings thrown up by g++.
authorAngus Leeming <leeming@lyx.org>
Thu, 20 Nov 2003 01:22:51 +0000 (01:22 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 20 Nov 2003 01:22:51 +0000 (01:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8106 a592a061-630c-0410-9148-cb99ea01b6c8

16 files changed:
src/frontends/qt2/BulletsModule.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QLImage.C
src/frontends/qt2/QSendto.C
src/frontends/qt2/QTabularDialog.C
src/frontends/qt2/qt_helpers.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/ColorHandler.C
src/frontends/xforms/FormNote.C
src/insets/ChangeLog
src/insets/insetcharstyle.C
src/insets/insetcollapsable.C
src/insets/insettabular.C
src/insets/insettoc.C
src/mathed/ChangeLog
src/mathed/formulabase.C

index 37adee70c173391072cf70158e76bfd48d4c2e22..3f50ac5892905c1800868a6e1daadd4857232780 100644 (file)
@@ -233,8 +233,8 @@ void BulletsModule::setBullet(int level, const Bullet & bullet)
 {
        bullets_[level] = bullet;
 
-       QPushButton * pb;
-       QComboBox * co;
+       QPushButton * pb = 0;
+       QComboBox * co = 0;
 
        switch (level) {
                case 0: pb = bullet1PB; co = bulletsize1CO; break;
index 55affae91ec9fac62e05a097bcc7512dd43a12bb..50bbeac2e2d7c37ac30825d19668b5b9f3ae9f35 100644 (file)
@@ -1,3 +1,12 @@
+2003-11-20  Angus Leeming  <leeming@lyx.org>
+
+       * BulletsModule.C (setBullet): squash gcc 'may be uninitialized' warning.
+       * QTabularDialog.C (hAlign_changed, vAlign_changed): ditto.
+
+       * QLImage.C (clip_impl): squash comparison of signed, unsigned warning.
+       * QSendto.C (apply, isValid): ditto.
+       * qt_helpers.C (formatted): ditto.
+
 2003-11-05  João Luis M. Assirati  <assirati@fma.if.usp.br>
 
        * lyx_gui.C: {set,remove}_{server,data}socket_callback(): replace
index 2078eb77d5a66622d0d3a11dca9ea5cb0e1ba312..aaa0f4d5f78af8b61e23d3a4219fd90425cb0437 100644 (file)
@@ -208,7 +208,7 @@ void QLImage::clip_impl(Params const & params)
                return;
 
        int const xoffset_l = params.bb.xl;
-       int const yoffset_t = (pixmap_.height() > params.bb.yt ?
+       int const yoffset_t = (pixmap_.height() > int(params.bb.yt) ?
                                pixmap_.height() - params.bb.yt : 0);
 
        xformed_pixmap_.resize(new_width, new_height);
index 8e84fc31ec20f9f4b2dc80c331082df6f0c9c649..eaed4b15aa2f1aedf0d60c475978be14461fdf43 100644 (file)
@@ -78,7 +78,7 @@ void QSendto::apply()
 {
        int const line(dialog_->formatLB->currentItem());
 
-       if (line < 0 || line > dialog_->formatLB->count())
+       if (line < 0 || line > int(dialog_->formatLB->count()))
                return;
 
        string const cmd(fromqstr(dialog_->commandCO->currentText()));
@@ -92,7 +92,7 @@ bool QSendto::isValid()
 {
        int const line(dialog_->formatLB->currentItem());
 
-       if (line < 0 || line > dialog_->formatLB->count())
+       if (line < 0 || line > int(dialog_->formatLB->count()))
                return false;
 
        else return dialog_->formatLB->count() != 0 &&
index 8b87feac318a8005bbb15f9f109d3798930dfc43..9d7bc25803d534b232844be09521e3e19ac2e3fe 100644 (file)
@@ -137,7 +137,7 @@ void QTabularDialog::rotateCell()
 
 void QTabularDialog::hAlign_changed(int align)
 {
-       ControlTabular::HALIGN h;
+       ControlTabular::HALIGN h = ControlTabular::LEFT;
 
        switch (align) {
                case 0: h = ControlTabular::LEFT; break;
@@ -152,7 +152,7 @@ void QTabularDialog::hAlign_changed(int align)
 
 void QTabularDialog::vAlign_changed(int align)
 {
-       ControlTabular::VALIGN v;
+       ControlTabular::VALIGN v = ControlTabular::TOP;
 
        switch (align) {
                case 0: v = ControlTabular::TOP; break;
index 4f3acc0ea85d592f55206ff6e050c0c1c9481990..8aa22cbc0922748c7f3670ff3d9caa1620bb283f 100644 (file)
@@ -146,7 +146,7 @@ string const formatted(string const & text, int w)
                        line.empty() ? word : line + ' ' + word;
 
                // FIXME: make w be size_t
-               if (line_plus_word.length() >= w) {
+               if (int(line_plus_word.length()) >= w) {
                        sout += line + '\n';
                        if (newline) {
                                sout += word + '\n';
index 93dd6dc69d513733ae9351f56fa7c1e5dc528d88..d4abc5e24c1723018c805936fff2b9413495cf4d 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-20  Angus Leeming  <leeming@lyx.org>
+
+       * ColorHandler.C (ctor):
+       * FormNote.C (build, update): squash warnings about comparison of
+       signed, unsigned.
 
 2003-11-04  Alfredo Braunstein  <abraunst@libero.it>
 
index 02ff865b4d2b113c2821aecd666eed5f3041bbd4..ac4da0db5043977d62b2419636bd9f6653de9298 100644 (file)
@@ -56,7 +56,7 @@ LyXColorHandler::LyXColorHandler()
 
        colormap = fl_state[fl_get_vclass()].colormap;
        // Clear the GC cache
-       for (int i = 0; i < colorGCcache.size(); ++i) {
+       for (string::size_type i = 0; i < colorGCcache.size(); ++i) {
                colorGCcache[i] = 0;
        }
 }
index 9d0b192b2f400ff75cd2d5884da131eff0a6a990..3db5352fc54f1fc1c2810f82ee893b2b9fc510ee 100644 (file)
@@ -38,7 +38,7 @@ void FormNote::build()
 
        note_gui_tokens(ids_, gui_names_);
 
-       for (int i = 0; i < gui_names_.size(); ++i) {
+       for (string::size_type i = 0; i < gui_names_.size(); ++i) {
                fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
        }
 
@@ -56,7 +56,7 @@ void FormNote::build()
 void FormNote::update()
 {
        string type(controller().params().type);
-       for (int i = 0; i < gui_names_.size(); ++i) {
+       for (string::size_type i = 0; i < gui_names_.size(); ++i) {
                if (type == ids_[i])
                        fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
                }
index e190a40fb0734de51bdaae75fffbb407b7422c9c..55acddedecda3634531cf0a0c1efa3add53fa7b2 100644 (file)
@@ -1,3 +1,12 @@
+2003-11-20  Angus Leeming  <leeming@lyx.org>
+
+       * insetcharstyle.C (latex, linuxdoc, docbook, plaintext): squash warnings
+       about unused parameters.
+
+       * insetcollapsable.C (open):
+       * insettabular.C (pasteSelection):
+       * insettoc.C (draw): ditto.
+
 2003-11-17  Alfredo Braunstein  <abraunst@lyx.org>
 
        * insetcollapsable.C: 
index f9083305bbe7e222b6ce15616c834e5dd07d54a4..5442418ef51d83ed0252357a4fdd08b65a09a124 100644 (file)
@@ -150,8 +150,8 @@ int outputVerbatim(std::ostream & os, InsetText inset)
 } // namespace anon
 
 
-int InsetCharStyle::latex(Buffer const & buf, ostream & os,
-                    OutputParams const & runparams) const
+int InsetCharStyle::latex(Buffer const &, ostream & os,
+                    OutputParams const &) const
 {
        os << "%\n\\" << params_.latexname << "{";
        int i = outputVerbatim(os, inset);
@@ -161,8 +161,8 @@ int InsetCharStyle::latex(Buffer const & buf, ostream & os,
 }
 
 
-int InsetCharStyle::linuxdoc(Buffer const & buf, std::ostream & os,
-                       OutputParams const & runparams) const
+int InsetCharStyle::linuxdoc(Buffer const &, std::ostream & os,
+                            OutputParams const &) const
 {
        os << "<" << params_.latexname << ">";
        int const i = outputVerbatim(os, inset);
@@ -171,8 +171,8 @@ int InsetCharStyle::linuxdoc(Buffer const & buf, std::ostream & os,
 }
 
 
-int InsetCharStyle::docbook(Buffer const & buf, std::ostream & os,
-                      OutputParams const & runparams) const
+int InsetCharStyle::docbook(Buffer const &, std::ostream & os,
+                           OutputParams const &) const
 {
        os << "<" << params_.latexname << ">";
        int const i = outputVerbatim(os, inset);
@@ -181,8 +181,8 @@ int InsetCharStyle::docbook(Buffer const & buf, std::ostream & os,
 }
 
 
-int InsetCharStyle::plaintext(Buffer const & buf, std::ostream & os,
-                    OutputParams const & runparams) const
+int InsetCharStyle::plaintext(Buffer const &, std::ostream & os,
+                             OutputParams const & runparams) const
 {
        return outputVerbatim(os, inset);
 }
index 359ca632fca68782eb084f6ce50a370db6799688..ba95556760727ccd7b5517820bd3f1ce23fbf2a2 100644 (file)
@@ -379,7 +379,7 @@ LyXText * InsetCollapsable::getText(int i) const
 }
 
 
-void InsetCollapsable::open(BufferView * bv)
+void InsetCollapsable::open(BufferView *)
 {
        if (!collapsed_)
                return;
index 47a1502d17ac93e6fcf16a6e6a03d55a5177e141..7349c6af059e93d8821c5d978c1032803bd5ac4c 100644 (file)
@@ -1905,7 +1905,7 @@ bool InsetTabular::copySelection(BufferView * bv)
 }
 
 
-bool InsetTabular::pasteSelection(BufferView * bv)
+bool InsetTabular::pasteSelection(BufferView *)
 {
        if (!paste_tabular)
                return false;
index 4811e1d1d0f96d98386e948b8f282f7bfe05b4b9..7277322f000d7f215e90ab40a6562a3f9e01cd2e 100644 (file)
@@ -68,7 +68,7 @@ void InsetTOC::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void InsetTOC::draw(PainterInfo & pi, int x, int y) const
+void InsetTOC::draw(PainterInfo & pi, int, int y) const
 {
        InsetCommand::draw(pi, button().box().x1, y);
 }
index a5103425e842cd31464243c64a387f5182b54dd7..554e418681248efd65f1255ea90b190e31e2f55f 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-20  Angus Leeming  <leeming@lyx.org>
+
+       * formulabase.C (getCursorDim): squash warning about unused variable.
+
 2003-11-13  Alfredo Braunstein  <abraunst@lyx.org>
 
        * formulabase.[Ch] (getCursorDim): add
index f815d86ba5dd77a29318b95d77b1ef3286030347..7157c9d57f3d409cfd2686439a008762411f3247 100644 (file)
@@ -186,8 +186,7 @@ void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
 }
 
 
-void InsetFormulaBase::getCursorDim(BufferView * bv,
-                                   int & asc, int & desc) const
+void InsetFormulaBase::getCursorDim(BufferView *, int & asc, int & desc) const
 {
        if (!mathcursor)
                return;