diff --git a/src/frontends/qt2/BulletsModule.C b/src/frontends/qt2/BulletsModule.C index 37adee70c1..3f50ac5892 100644 --- a/src/frontends/qt2/BulletsModule.C +++ b/src/frontends/qt2/BulletsModule.C @@ -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; diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 55affae91e..50bbeac2e2 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2003-11-20 Angus Leeming + + * 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 * lyx_gui.C: {set,remove}_{server,data}socket_callback(): replace diff --git a/src/frontends/qt2/QLImage.C b/src/frontends/qt2/QLImage.C index 2078eb77d5..aaa0f4d5f7 100644 --- a/src/frontends/qt2/QLImage.C +++ b/src/frontends/qt2/QLImage.C @@ -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); diff --git a/src/frontends/qt2/QSendto.C b/src/frontends/qt2/QSendto.C index 8e84fc31ec..eaed4b15aa 100644 --- a/src/frontends/qt2/QSendto.C +++ b/src/frontends/qt2/QSendto.C @@ -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 && diff --git a/src/frontends/qt2/QTabularDialog.C b/src/frontends/qt2/QTabularDialog.C index 8b87feac31..9d7bc25803 100644 --- a/src/frontends/qt2/QTabularDialog.C +++ b/src/frontends/qt2/QTabularDialog.C @@ -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; diff --git a/src/frontends/qt2/qt_helpers.C b/src/frontends/qt2/qt_helpers.C index 4f3acc0ea8..8aa22cbc09 100644 --- a/src/frontends/qt2/qt_helpers.C +++ b/src/frontends/qt2/qt_helpers.C @@ -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'; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 93dd6dc69d..d4abc5e24c 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2003-11-20 Angus Leeming + + * ColorHandler.C (ctor): + * FormNote.C (build, update): squash warnings about comparison of + signed, unsigned. 2003-11-04 Alfredo Braunstein diff --git a/src/frontends/xforms/ColorHandler.C b/src/frontends/xforms/ColorHandler.C index 02ff865b4d..ac4da0db50 100644 --- a/src/frontends/xforms/ColorHandler.C +++ b/src/frontends/xforms/ColorHandler.C @@ -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; } } diff --git a/src/frontends/xforms/FormNote.C b/src/frontends/xforms/FormNote.C index 9d0b192b2f..3db5352fc5 100644 --- a/src/frontends/xforms/FormNote.C +++ b/src/frontends/xforms/FormNote.C @@ -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()); } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index e190a40fb0..55acddedec 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,12 @@ +2003-11-20 Angus Leeming + + * 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 * insetcollapsable.C: diff --git a/src/insets/insetcharstyle.C b/src/insets/insetcharstyle.C index f9083305bb..5442418ef5 100644 --- a/src/insets/insetcharstyle.C +++ b/src/insets/insetcharstyle.C @@ -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); } diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 359ca632fc..ba95556760 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -379,7 +379,7 @@ LyXText * InsetCollapsable::getText(int i) const } -void InsetCollapsable::open(BufferView * bv) +void InsetCollapsable::open(BufferView *) { if (!collapsed_) return; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 47a1502d17..7349c6af05 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -1905,7 +1905,7 @@ bool InsetTabular::copySelection(BufferView * bv) } -bool InsetTabular::pasteSelection(BufferView * bv) +bool InsetTabular::pasteSelection(BufferView *) { if (!paste_tabular) return false; diff --git a/src/insets/insettoc.C b/src/insets/insettoc.C index 4811e1d1d0..7277322f00 100644 --- a/src/insets/insettoc.C +++ b/src/insets/insettoc.C @@ -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); } diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index a5103425e8..554e418681 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2003-11-20 Angus Leeming + + * formulabase.C (getCursorDim): squash warning about unused variable. + 2003-11-13 Alfredo Braunstein * formulabase.[Ch] (getCursorDim): add diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index f815d86ba5..7157c9d57f 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -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;