diff --git a/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c b/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c index 48273c0fa6..0ac52eb678 100644 --- a/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c +++ b/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c @@ -112,7 +112,7 @@ void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_le void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]) { unsigned i, j; - FLAC__double r, err, ref[FLAC__MAX_LPC_ORDER], lpc[FLAC__MAX_LPC_ORDER]; + FLAC__double r, err, lpc[FLAC__MAX_LPC_ORDER]; FLAC__ASSERT(0 != max_order); FLAC__ASSERT(0 < *max_order); @@ -126,7 +126,6 @@ void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_o r = -autoc[i+1]; for(j = 0; j < i; j++) r -= lpc[j] * autoc[i-j]; - ref[i] = (r/=err); /* Update LPC coefficients and total error. */ lpc[i]=r; diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 4fda04a11c..f59e0fc140 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -500,8 +500,6 @@ public: using namespace WavFileHelpers; uint64 len = 0; uint64 end = 0; - bool hasGotType = false; - bool hasGotData = false; int cueNoteIndex = 0; int cueLabelIndex = 0; int cueRegionIndex = 0; @@ -598,8 +596,6 @@ public: { bytesPerFrame = 0; } - - hasGotType = true; } else if (chunkType == chunkName ("data")) { @@ -608,8 +604,6 @@ public: dataChunkStart = input->getPosition(); lengthInSamples = (bytesPerFrame > 0) ? (dataLength / bytesPerFrame) : 0; - - hasGotData = true; } else if (chunkType == chunkName ("bext")) { diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c index 52387c382a..eb248d2376 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c @@ -1016,7 +1016,7 @@ static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ } } - fit_value[i]=val+predicted&0x7fff; + fit_value[i] = (val + predicted) & 0x7fff; fit_value[look->loneighbor[i-2]]&=0x7fff; fit_value[look->hineighbor[i-2]]&=0x7fff; diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lsp.c b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lsp.c index 8e566901ac..a886241b9e 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lsp.c +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/lsp.c @@ -309,7 +309,6 @@ static int JUCE_CDECL comp(const void *a,const void *b){ #define EPSILON 10e-7 static int Laguerre_With_Deflation(float *a,int ord,float *r){ int i,m; - double lastdelta=0.f; double *defl=(double*)alloca(sizeof(*defl)*(ord+1)); for(i=0;i<=ord;i++)defl[i]=a[i]; @@ -346,7 +345,6 @@ static int Laguerre_With_Deflation(float *a,int ord,float *r){ if(delta<0.f)delta*=-1; if(fabs(delta/newx)<10e-12)break; - lastdelta=delta; } r[m-1]=newx; diff --git a/modules/juce_core/memory/juce_MemoryBlock.cpp b/modules/juce_core/memory/juce_MemoryBlock.cpp index bf38289ccd..e6ff0f2f1f 100644 --- a/modules/juce_core/memory/juce_MemoryBlock.cpp +++ b/modules/juce_core/memory/juce_MemoryBlock.cpp @@ -53,9 +53,9 @@ MemoryBlock::MemoryBlock (const MemoryBlock& other) } MemoryBlock::MemoryBlock (const void* const dataToInitialiseFrom, const size_t sizeInBytes) - : size (jmax ((size_t) 0, sizeInBytes)) + : size (sizeInBytes) { - jassert (sizeInBytes >= 0); + jassert (((ssize_t) sizeInBytes) >= 0); if (size > 0) { diff --git a/modules/juce_core/native/juce_linux_Files.cpp b/modules/juce_core/native/juce_linux_Files.cpp index 4e63e2794d..724981a014 100644 --- a/modules/juce_core/native/juce_linux_Files.cpp +++ b/modules/juce_core/native/juce_linux_Files.cpp @@ -110,7 +110,7 @@ namespace { File juce_readlink (const String& file, const File& defaultFile) { - const int size = 8192; + const size_t size = 8192; HeapBlock buffer; buffer.malloc (size + 4); diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp index fd2d1a48c8..e3e8586c1e 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp @@ -439,12 +439,10 @@ void GlyphArrangement::addFittedText (const Font& f, float lineY = y; float widthPerLine = lineWidth / numLines; - int lastLineStartIndex = 0; for (int line = 0; line < numLines; ++line) { int i = startIndex; - lastLineStartIndex = i; float lineStartX = glyphs.getReference (startIndex).getLeft(); if (line == numLines - 1) diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp index b3988fee52..bd498a99c7 100644 --- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp @@ -2443,12 +2443,10 @@ private: XClientMessageEvent msg = { 0 }; msg.message_type = Atoms::get().XdndEnter; - const Atoms& atoms = Atoms::get(); - const Atom* mimeTypes = dragState.getMimeTypes(); const int numMimeTypes = dragState.getNumMimeTypes(); - msg.data.l[1] = dragState.xdndVersion << 24 | numMimeTypes > 3; + msg.data.l[1] = (dragState.xdndVersion << 24) | (numMimeTypes > 3); msg.data.l[2] = numMimeTypes > 0 ? mimeTypes[0] : 0; msg.data.l[3] = numMimeTypes > 1 ? mimeTypes[1] : 0; msg.data.l[4] = numMimeTypes > 2 ? mimeTypes[2] : 0; @@ -2539,8 +2537,8 @@ private: dragState.silentRect = Rectangle(); if ((clientMsg.data.l[1] & 1) != 0 - && (clientMsg.data.l[4] == Atoms::get().XdndActionCopy - || clientMsg.data.l[4] == Atoms::get().XdndActionPrivate)) + && ((Atom) clientMsg.data.l[4] == Atoms::get().XdndActionCopy + || (Atom) clientMsg.data.l[4] == Atoms::get().XdndActionPrivate)) { if ((clientMsg.data.l[1] & 2) == 0) // target requests silent rectangle dragState.silentRect.setBounds (clientMsg.data.l[2] >> 16, diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp index 18a2b28b32..85e559f8ee 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp @@ -834,7 +834,6 @@ void CodeDocument::insert (const String& text, const int insertPos, const bool u { Position pos (*this, insertPos); const int firstAffectedLine = pos.getLineNumber(); - int lastAffectedLine = firstAffectedLine + 1; CodeDocumentLine* const firstLine = lines [firstAffectedLine]; String textInsideOriginalLine (text); @@ -857,10 +856,7 @@ void CodeDocument::insert (const String& text, const int insertPos, const bool u lines.set (firstAffectedLine, newFirstLine); if (newLines.size() > 1) - { lines.insertArray (firstAffectedLine + 1, newLines.getRawDataPointer() + 1, newLines.size() - 1); - lastAffectedLine = lines.size(); - } int lineStart = newFirstLine->lineStartInFile; for (int i = firstAffectedLine; i < lines.size(); ++i) @@ -938,7 +934,6 @@ void CodeDocument::remove (const int startPos, const int endPos, const bool undo maximumLineLength = -1; const int firstAffectedLine = startPosition.getLineNumber(); const int endLine = endPosition.getLineNumber(); - int lastAffectedLine = firstAffectedLine + 1; CodeDocumentLine& firstLine = *lines.getUnchecked (firstAffectedLine); if (firstAffectedLine == endLine) @@ -949,8 +944,6 @@ void CodeDocument::remove (const int startPos, const int endPos, const bool undo } else { - lastAffectedLine = lines.size(); - CodeDocumentLine& lastLine = *lines.getUnchecked (endLine); firstLine.line = firstLine.line.substring (0, startPosition.getIndexInLine())