Browse Source

Cleaned up a few static analyser warnings.

tags/2021-05-28
jules 13 years ago
parent
commit
ffd894089d
4 changed files with 15 additions and 8 deletions
  1. +6
    -3
      extras/Introjucer/Source/Application/jucer_MainWindow.cpp
  2. +5
    -2
      extras/Introjucer/Source/Code Editor/jucer_SourceCodeEditor.cpp
  3. +2
    -1
      modules/juce_core/zip/zlib/deflate.c
  4. +2
    -2
      modules/juce_graphics/image_formats/jpglib/jcparam.c

+ 6
- 3
extras/Introjucer/Source/Application/jucer_MainWindow.cpp 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;


+ 5
- 2
extras/Introjucer/Source/Code Editor/jucer_SourceCodeEditor.cpp 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()


+ 2
- 1
modules/juce_core/zip/zlib/deflate.c 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;
}


+ 2
- 2
modules/juce_graphics/image_formats/jpglib/jcparam.c 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);
}
}


Loading…
Cancel
Save