mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fix "dead store" warnings of Xcode analyze tool
This commit is contained in:
parent
912cdafb85
commit
77cc2c7c8c
@ -219,7 +219,7 @@ AspellConfig * AspellChecker::Private::getConfig(string const & lang, string con
|
||||
}
|
||||
if (!have_dict) {
|
||||
// check for package data of OS installation
|
||||
have_dict = checkAspellData(config, osPackageBase(), osPackageDataDirectory(), osPackageDictDirectory(), lang, variety);
|
||||
checkAspellData(config, osPackageBase(), osPackageDataDirectory(), osPackageDictDirectory(), lang, variety);
|
||||
}
|
||||
return config ;
|
||||
}
|
||||
|
@ -413,8 +413,8 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
}
|
||||
|
||||
// used below to track whether we are in an IfStyle or IfCounter tag.
|
||||
bool ifstyle = false;
|
||||
bool ifcounter = false;
|
||||
bool ifstyle = false;
|
||||
bool ifcounter = false;
|
||||
|
||||
switch (static_cast<TextClassTags>(le)) {
|
||||
|
||||
@ -508,9 +508,6 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
Layout lay;
|
||||
readStyle(lexrc, lay);
|
||||
}
|
||||
|
||||
// reset flag
|
||||
ifstyle = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -764,8 +761,6 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
lexrc.printError("No name given for style: `$$Token'.");
|
||||
error = true;
|
||||
}
|
||||
// reset flag
|
||||
ifcounter = false;
|
||||
break;
|
||||
|
||||
case TC_TITLELATEXTYPE:
|
||||
|
@ -260,9 +260,6 @@ void GuiCitation::updateStyles(BiblioInfo const & bi)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!selectedLV->selectionModel()->selectedIndexes().empty())
|
||||
curr = selectedLV->selectionModel()->selectedIndexes()[0].row();
|
||||
|
||||
static const size_t max_length = 80;
|
||||
QStringList sty = citationStyles(bi, max_length);
|
||||
|
||||
|
@ -2863,7 +2863,6 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
|
||||
QString const lfun_name = toqstr(from_utf8(action_name)
|
||||
+ ' ' + lfun.argument());
|
||||
QString const shortcut = toqstr(seq.print(KeySequence::ForGui));
|
||||
KeyMap::ItemType item_tag = tag;
|
||||
|
||||
QTreeWidgetItem * newItem = 0;
|
||||
// for unbind items, try to find an existing item in the system bind list
|
||||
@ -2880,7 +2879,6 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
|
||||
// Such an item is not displayed to avoid confusion (what is
|
||||
// unmatched removed?).
|
||||
if (!newItem) {
|
||||
item_tag = KeyMap::UserExtraUnbind;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -2913,7 +2911,7 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
|
||||
newItem->setText(1, shortcut);
|
||||
// record BindFile representation to recover KeySequence when needed.
|
||||
newItem->setData(1, Qt::UserRole, toqstr(seq.print(KeySequence::BindFile)));
|
||||
setItemType(newItem, item_tag);
|
||||
setItemType(newItem, tag);
|
||||
return newItem;
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,6 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
||||
int const ww = max(textdim.wid, w);
|
||||
pi.pain.rectText(x + (ww - w) / 2, y + desc + a,
|
||||
buttonLabel(bv), font, Color_none, Color_none);
|
||||
desc += d;
|
||||
}
|
||||
|
||||
// a visual cue when the cursor is inside the inset
|
||||
|
@ -616,10 +616,8 @@ void InsetExternal::setParams(InsetExternalParams const & p)
|
||||
LASSERT(false, return);
|
||||
break;
|
||||
case PREVIEW_INSTANT: {
|
||||
//FIXME: why is the value below immediately forgotten?
|
||||
RenderMonitoredPreview * preview_ptr = renderer_->asMonitoredPreview();
|
||||
renderer_.reset(new RenderMonitoredPreview(this));
|
||||
preview_ptr = renderer_->asMonitoredPreview();
|
||||
RenderMonitoredPreview * preview_ptr = preview_ptr = renderer_->asMonitoredPreview();
|
||||
preview_ptr->fileChanged(bind(&InsetExternal::fileChanged, this));
|
||||
if (preview_ptr->monitoring())
|
||||
preview_ptr->stopMonitoring();
|
||||
|
@ -6231,7 +6231,6 @@ bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
|
||||
if (usePaste) {
|
||||
paste_tabular.reset(new Tabular(buffer_, rows, maxCols));
|
||||
loctab = paste_tabular.get();
|
||||
cols = 0;
|
||||
dirtyTabularStack(true);
|
||||
} else {
|
||||
loctab = &tabular;
|
||||
|
@ -592,7 +592,6 @@ string escape_for_regex(string s, bool match_latex)
|
||||
}
|
||||
if (end_pos == s.size()) {
|
||||
s.replace(new_pos, end_pos - new_pos, t);
|
||||
pos = s.size();
|
||||
LYXERR(Debug::FIND, "Regexp after \\regexp{} removal: " << s);
|
||||
break;
|
||||
}
|
||||
@ -1224,12 +1223,10 @@ int findBackwardsAdv(DocIterator & cur, MatchStringAdv & match)
|
||||
return 0;
|
||||
cur.backwardPos();
|
||||
DocIterator cur_orig(cur);
|
||||
bool found_match;
|
||||
bool pit_changed = false;
|
||||
found_match = false;
|
||||
do {
|
||||
cur.pos() = 0;
|
||||
found_match = match(cur, -1, false);
|
||||
bool found_match = match(cur, -1, false);
|
||||
|
||||
if (found_match) {
|
||||
if (pit_changed)
|
||||
|
Loading…
Reference in New Issue
Block a user