mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-08 04:20:09 +00:00
Avoided a few gcc compiler warnings.
This commit is contained in:
parent
9393c1bbc9
commit
4ef89c890f
9 changed files with 8 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace
|
|||
{
|
||||
File juce_readlink (const String& file, const File& defaultFile)
|
||||
{
|
||||
const int size = 8192;
|
||||
const size_t size = 8192;
|
||||
HeapBlock<char> buffer;
|
||||
buffer.malloc (size + 4);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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<int>();
|
||||
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue