1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Cleaned up a few static analyser warnings.

This commit is contained in:
jules 2013-03-15 19:36:28 +00:00
parent 7be8153f2d
commit ffd894089d
4 changed files with 15 additions and 8 deletions

View file

@ -242,10 +242,13 @@ bool MainWindow::shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::
{
for (int i = selected.size(); --i >= 0;)
{
const File f (selected.getUnchecked(i)->getDraggableFile());
if (JucerTreeViewBase* tv = selected.getUnchecked(i))
{
const File f (tv->getDraggableFile());
if (f.existsAsFile())
files.add (f.getFullPathName());
if (f.existsAsFile())
files.add (f.getFullPathName());
}
}
canMoveFiles = false;

View file

@ -400,8 +400,11 @@ void GenericCodeEditorComponent::showFindPanel()
resized();
}
findPanel->editor.grabKeyboardFocus();
findPanel->editor.selectAll();
if (findPanel != nullptr)
{
findPanel->editor.grabKeyboardFocus();
findPanel->editor.selectAll();
}
}
void GenericCodeEditorComponent::hideFindPanel()

View file

@ -333,7 +333,8 @@ int ZEXPORT deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt
for (n = 0; n <= length - MIN_MATCH; n++) {
INSERT_STRING(s, n, hash_head);
}
if (hash_head) hash_head = 0; /* to make compiler happy */
(void) hash_head; /* to make compiler happy */
return Z_OK;
}

View file

@ -592,7 +592,7 @@ jpeg_simple_progression (j_compress_ptr cinfo)
scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0);
scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);
/* Luma bottom bit comes last since it's usually largest scan */
scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);
fill_a_scan(scanptr, 0, 1, 63, 1, 0);
} else {
/* All-purpose script for other color spaces. */
/* Successive approximation first pass */
@ -603,7 +603,7 @@ jpeg_simple_progression (j_compress_ptr cinfo)
scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1);
/* Successive approximation final pass */
scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);
fill_scans(scanptr, ncomps, 1, 63, 1, 0);
}
}