mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Squash a bunch of warnings thrown up by g++.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8106 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f5d5eebe3c
commit
c8507b7fcd
@ -233,8 +233,8 @@ void BulletsModule::setBullet(int level, const Bullet & bullet)
|
|||||||
{
|
{
|
||||||
bullets_[level] = bullet;
|
bullets_[level] = bullet;
|
||||||
|
|
||||||
QPushButton * pb;
|
QPushButton * pb = 0;
|
||||||
QComboBox * co;
|
QComboBox * co = 0;
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 0: pb = bullet1PB; co = bulletsize1CO; break;
|
case 0: pb = bullet1PB; co = bulletsize1CO; break;
|
||||||
|
@ -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>
|
2003-11-05 João Luis M. Assirati <assirati@fma.if.usp.br>
|
||||||
|
|
||||||
* lyx_gui.C: {set,remove}_{server,data}socket_callback(): replace
|
* lyx_gui.C: {set,remove}_{server,data}socket_callback(): replace
|
||||||
|
@ -208,7 +208,7 @@ void QLImage::clip_impl(Params const & params)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int const xoffset_l = params.bb.xl;
|
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);
|
pixmap_.height() - params.bb.yt : 0);
|
||||||
|
|
||||||
xformed_pixmap_.resize(new_width, new_height);
|
xformed_pixmap_.resize(new_width, new_height);
|
||||||
|
@ -78,7 +78,7 @@ void QSendto::apply()
|
|||||||
{
|
{
|
||||||
int const line(dialog_->formatLB->currentItem());
|
int const line(dialog_->formatLB->currentItem());
|
||||||
|
|
||||||
if (line < 0 || line > dialog_->formatLB->count())
|
if (line < 0 || line > int(dialog_->formatLB->count()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
string const cmd(fromqstr(dialog_->commandCO->currentText()));
|
string const cmd(fromqstr(dialog_->commandCO->currentText()));
|
||||||
@ -92,7 +92,7 @@ bool QSendto::isValid()
|
|||||||
{
|
{
|
||||||
int const line(dialog_->formatLB->currentItem());
|
int const line(dialog_->formatLB->currentItem());
|
||||||
|
|
||||||
if (line < 0 || line > dialog_->formatLB->count())
|
if (line < 0 || line > int(dialog_->formatLB->count()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
else return dialog_->formatLB->count() != 0 &&
|
else return dialog_->formatLB->count() != 0 &&
|
||||||
|
@ -137,7 +137,7 @@ void QTabularDialog::rotateCell()
|
|||||||
|
|
||||||
void QTabularDialog::hAlign_changed(int align)
|
void QTabularDialog::hAlign_changed(int align)
|
||||||
{
|
{
|
||||||
ControlTabular::HALIGN h;
|
ControlTabular::HALIGN h = ControlTabular::LEFT;
|
||||||
|
|
||||||
switch (align) {
|
switch (align) {
|
||||||
case 0: h = ControlTabular::LEFT; break;
|
case 0: h = ControlTabular::LEFT; break;
|
||||||
@ -152,7 +152,7 @@ void QTabularDialog::hAlign_changed(int align)
|
|||||||
|
|
||||||
void QTabularDialog::vAlign_changed(int align)
|
void QTabularDialog::vAlign_changed(int align)
|
||||||
{
|
{
|
||||||
ControlTabular::VALIGN v;
|
ControlTabular::VALIGN v = ControlTabular::TOP;
|
||||||
|
|
||||||
switch (align) {
|
switch (align) {
|
||||||
case 0: v = ControlTabular::TOP; break;
|
case 0: v = ControlTabular::TOP; break;
|
||||||
|
@ -146,7 +146,7 @@ string const formatted(string const & text, int w)
|
|||||||
line.empty() ? word : line + ' ' + word;
|
line.empty() ? word : line + ' ' + word;
|
||||||
|
|
||||||
// FIXME: make w be size_t
|
// FIXME: make w be size_t
|
||||||
if (line_plus_word.length() >= w) {
|
if (int(line_plus_word.length()) >= w) {
|
||||||
sout += line + '\n';
|
sout += line + '\n';
|
||||||
if (newline) {
|
if (newline) {
|
||||||
sout += word + '\n';
|
sout += word + '\n';
|
||||||
|
@ -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>
|
2003-11-04 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ LyXColorHandler::LyXColorHandler()
|
|||||||
|
|
||||||
colormap = fl_state[fl_get_vclass()].colormap;
|
colormap = fl_state[fl_get_vclass()].colormap;
|
||||||
// Clear the GC cache
|
// 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;
|
colorGCcache[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ void FormNote::build()
|
|||||||
|
|
||||||
note_gui_tokens(ids_, gui_names_);
|
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());
|
fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ void FormNote::build()
|
|||||||
void FormNote::update()
|
void FormNote::update()
|
||||||
{
|
{
|
||||||
string type(controller().params().type);
|
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])
|
if (type == ids_[i])
|
||||||
fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
|
fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
|
||||||
}
|
}
|
||||||
|
@ -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>
|
2003-11-17 Alfredo Braunstein <abraunst@lyx.org>
|
||||||
|
|
||||||
* insetcollapsable.C:
|
* insetcollapsable.C:
|
||||||
|
@ -150,8 +150,8 @@ int outputVerbatim(std::ostream & os, InsetText inset)
|
|||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
|
||||||
int InsetCharStyle::latex(Buffer const & buf, ostream & os,
|
int InsetCharStyle::latex(Buffer const &, ostream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const &) const
|
||||||
{
|
{
|
||||||
os << "%\n\\" << params_.latexname << "{";
|
os << "%\n\\" << params_.latexname << "{";
|
||||||
int i = outputVerbatim(os, inset);
|
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,
|
int InsetCharStyle::linuxdoc(Buffer const &, std::ostream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const &) const
|
||||||
{
|
{
|
||||||
os << "<" << params_.latexname << ">";
|
os << "<" << params_.latexname << ">";
|
||||||
int const i = outputVerbatim(os, inset);
|
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,
|
int InsetCharStyle::docbook(Buffer const &, std::ostream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const &) const
|
||||||
{
|
{
|
||||||
os << "<" << params_.latexname << ">";
|
os << "<" << params_.latexname << ">";
|
||||||
int const i = outputVerbatim(os, inset);
|
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,
|
int InsetCharStyle::plaintext(Buffer const &, std::ostream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
return outputVerbatim(os, inset);
|
return outputVerbatim(os, inset);
|
||||||
}
|
}
|
||||||
|
@ -379,7 +379,7 @@ LyXText * InsetCollapsable::getText(int i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetCollapsable::open(BufferView * bv)
|
void InsetCollapsable::open(BufferView *)
|
||||||
{
|
{
|
||||||
if (!collapsed_)
|
if (!collapsed_)
|
||||||
return;
|
return;
|
||||||
|
@ -1905,7 +1905,7 @@ bool InsetTabular::copySelection(BufferView * bv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool InsetTabular::pasteSelection(BufferView * bv)
|
bool InsetTabular::pasteSelection(BufferView *)
|
||||||
{
|
{
|
||||||
if (!paste_tabular)
|
if (!paste_tabular)
|
||||||
return false;
|
return false;
|
||||||
|
@ -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);
|
InsetCommand::draw(pi, button().box().x1, y);
|
||||||
}
|
}
|
||||||
|
@ -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>
|
2003-11-13 Alfredo Braunstein <abraunst@lyx.org>
|
||||||
|
|
||||||
* formulabase.[Ch] (getCursorDim): add
|
* formulabase.[Ch] (getCursorDim): add
|
||||||
|
@ -186,8 +186,7 @@ void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFormulaBase::getCursorDim(BufferView * bv,
|
void InsetFormulaBase::getCursorDim(BufferView *, int & asc, int & desc) const
|
||||||
int & asc, int & desc) const
|
|
||||||
{
|
{
|
||||||
if (!mathcursor)
|
if (!mathcursor)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user