war on -Werror, part 2: unused variables and dead code
This commit is contained in:
@@ -383,9 +383,9 @@ RString CryptManager::GetMD5ForString( RString sData )
|
||||
int iHash = register_hash( &md5_desc );
|
||||
|
||||
hash_state hash;
|
||||
int iRet = hash_descriptor[iHash].init( &hash );
|
||||
iRet = hash_descriptor[iHash].process( &hash, (const unsigned char *) sData.data(), sData.size() );
|
||||
iRet = hash_descriptor[iHash].done( &hash, digest );
|
||||
hash_descriptor[iHash].init( &hash );
|
||||
hash_descriptor[iHash].process( &hash, (const unsigned char *) sData.data(), sData.size() );
|
||||
hash_descriptor[iHash].done( &hash, digest );
|
||||
|
||||
return RString( (const char *) digest, sizeof(digest) );
|
||||
}
|
||||
@@ -397,9 +397,9 @@ RString CryptManager::GetSHA1ForString( RString sData )
|
||||
int iHash = register_hash( &sha1_desc );
|
||||
|
||||
hash_state hash;
|
||||
int iRet = hash_descriptor[iHash].init( &hash );
|
||||
iRet = hash_descriptor[iHash].process( &hash, (const unsigned char *) sData.data(), sData.size() );
|
||||
iRet = hash_descriptor[iHash].done( &hash, digest );
|
||||
hash_descriptor[iHash].init( &hash );
|
||||
hash_descriptor[iHash].process( &hash, (const unsigned char *) sData.data(), sData.size() );
|
||||
hash_descriptor[iHash].done( &hash, digest );
|
||||
|
||||
return RString( (const char *) digest, sizeof(digest) );
|
||||
}
|
||||
|
||||
@@ -56,12 +56,7 @@ RString FileTransfer::Update( float fDeltaTime )
|
||||
|
||||
void FileTransfer::UpdateProgress()
|
||||
{
|
||||
float DownloadedRatio;
|
||||
|
||||
if( m_iTotalBytes < 1 )
|
||||
DownloadedRatio = 0;
|
||||
else
|
||||
DownloadedRatio = float(m_iDownloaded) / float(m_iTotalBytes);
|
||||
// Code here did nothing...
|
||||
}
|
||||
|
||||
void FileTransfer::Cancel()
|
||||
|
||||
@@ -2110,10 +2110,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
{
|
||||
// TODO: remove use of PlayerNumber
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
int iWeightPounds = 120;
|
||||
Profile *pProfile = PROFILEMAN->GetProfile( pn );
|
||||
if( pProfile )
|
||||
iWeightPounds = pProfile->GetCalculatedWeightPounds();
|
||||
|
||||
int iNumTracksHeld = 0;
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
|
||||
@@ -366,14 +366,12 @@ int RageSoundReader_MP3::fill_buffer()
|
||||
|
||||
void fill_frame_index_cache( madlib_t *mad )
|
||||
{
|
||||
int ms, percent, pos;
|
||||
int pos;
|
||||
|
||||
/* Only update the frame cache if our timer is consistent. */
|
||||
if(!mad->timer_accurate) return;
|
||||
|
||||
/* ms of the frame we just decoded: */
|
||||
ms = mad_timer_count(mad->Timer, MAD_UNITS_MILLISECONDS);
|
||||
percent = ms * 100 / mad->length;
|
||||
/* the frame we just decoded: */
|
||||
pos = get_this_frame_byte(mad);
|
||||
|
||||
/* Fill in the TOC percent. */
|
||||
|
||||
@@ -2618,7 +2618,6 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
}
|
||||
else
|
||||
{
|
||||
bool bAlreadyBGChangeHere = false;
|
||||
BackgroundLayer iLayer = BACKGROUND_LAYER_1;
|
||||
BackgroundChange bgChange;
|
||||
bgChange.m_fStartBeat = GAMESTATE->m_Position.m_fSongBeat;
|
||||
@@ -2626,7 +2625,6 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
if( bgc->m_fStartBeat == GAMESTATE->m_Position.m_fSongBeat )
|
||||
{
|
||||
bAlreadyBGChangeHere = true;
|
||||
bgChange = *bgc;
|
||||
m_pSong->GetBackgroundChanges(iLayer).erase( bgc );
|
||||
break;
|
||||
|
||||
@@ -650,9 +650,6 @@ void ScreenOptions::PositionRows( bool bTween )
|
||||
|
||||
float fPos = (float) pos;
|
||||
|
||||
LuaExpressionTransform *pExpr = NULL;
|
||||
pExpr = &m_exprRowPositionTransformFunction;
|
||||
|
||||
if( i < first_start ) fPos = -0.5f;
|
||||
else if( i >= first_end && i < second_start ) fPos = ((int)NUM_ROWS_SHOWN)/2-0.5f;
|
||||
else if( i >= second_end ) fPos = ((int)NUM_ROWS_SHOWN)-0.5f;
|
||||
|
||||
@@ -219,7 +219,6 @@ static void RunCrashHandler( const CrashData *crash )
|
||||
/* non-fatal */
|
||||
}
|
||||
|
||||
static int received = 0;
|
||||
static int active = 0;
|
||||
|
||||
if( active )
|
||||
@@ -250,7 +249,6 @@ static void RunCrashHandler( const CrashData *crash )
|
||||
_exit( 1 );
|
||||
}
|
||||
active = 1;
|
||||
received = getpid();
|
||||
|
||||
/* Stop other threads. XXX: This prints a spurious ptrace error if any threads
|
||||
* are already suspended, which happens in ForceCrashHandlerDeadlock(). */
|
||||
|
||||
@@ -28,7 +28,7 @@ int der_length_sequence(ltc_asn1_list *list, unsigned long inlen,
|
||||
unsigned long *outlen)
|
||||
{
|
||||
int err, type;
|
||||
unsigned long size, x, y, z, i;
|
||||
unsigned long size, x, y, i;
|
||||
void *data;
|
||||
|
||||
LTC_ARGCHK(list != NULL);
|
||||
@@ -137,7 +137,6 @@ int der_length_sequence(ltc_asn1_list *list, unsigned long inlen,
|
||||
}
|
||||
|
||||
/* calc header size */
|
||||
z = y;
|
||||
if (y < 128) {
|
||||
y += 2;
|
||||
} else if (y < 256) {
|
||||
|
||||
Reference in New Issue
Block a user