Address -Wall warnings

VideoWindow::ExposeEvent wasn't being used correctly; it should be a
TQCustomEvent (although, the 3000 type is already being used for
forwarding XINE_PROGRESS_EVENT).

While the pts_per_smpls part never seemed to be encountered, it would
have resulted in a floating point exception as it's always 0.  Commented
out to leave a hint as to what the code should be doing.

Resolves: TDE/codeine#2
Signed-off-by: mio <stigma@disroot.org>
pull/22/head
mio 2 months ago
parent c0311bdfc3
commit 9ef39acd5d

@ -175,8 +175,8 @@ void FHT::power2(float *p)
*p = (*p * *p), *p += *p, p++; *p = (*p * *p), *p += *p, p++;
for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q) for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q, p++)
*p++ = (*p * *p) + (*q * *q); *p = (*p * *p) + (*q * *q);
} }

@ -706,13 +706,19 @@ action( const char *name )
TDEActionCollection *actionCollection = nullptr; TDEActionCollection *actionCollection = nullptr;
TDEAction *action = nullptr; TDEAction *action = nullptr;
if( mainWindow = (MainWindow*)kapp->mainWidget() ) mainWindow = dynamic_cast<MainWindow *>(kapp->mainWidget());
if( actionCollection = mainWindow->actionCollection() ) if (mainWindow)
action = actionCollection->action( name ); {
actionCollection = mainWindow->actionCollection();
if (actionCollection)
{
action = actionCollection->action(name);
}
}
Q_ASSERT( mainWindow ); Q_ASSERT(mainWindow);
Q_ASSERT( actionCollection ); Q_ASSERT(actionCollection);
Q_ASSERT( action ); Q_ASSERT(action);
return action; return action;
} }

@ -120,6 +120,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::Paused: case Engine::Paused:
m_positionSlider->setEnabled( TheStream::canSeek() ); m_positionSlider->setEnabled( TheStream::canSeek() );
break; break;
default:
break;
} }
@ -160,6 +162,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::TrackEnded: case Engine::TrackEnded:
m_titleLabel->setText( TheStream::prettyTitle() ); m_titleLabel->setText( TheStream::prettyTitle() );
break; break;
default:
break;
} }
@ -187,6 +191,8 @@ MainWindow::engineStateChanged( Engine::State state )
case Engine::Playing: case Engine::Playing:
toolBar()->hide(); toolBar()->hide();
break; break;
default:
break;
} }
} }
} }

@ -226,11 +226,6 @@ VideoWindow::event( TQEvent *e )
stop(); stop();
return false; return false;
case VideoWindow::ExposeEvent:
//see VideoWindow::x11Event()
return true;
// Xlib.h sucks fucking balls!!!!11!!1! // Xlib.h sucks fucking balls!!!!11!!1!
#undef KeyPress #undef KeyPress
case TQEvent::KeyPress: { case TQEvent::KeyPress: {

@ -615,7 +615,7 @@ VideoWindow::scope()
//prune the buffer list and update the m_current_vpts timestamp //prune the buffer list and update the m_current_vpts timestamp
timerEvent( nullptr ); timerEvent( nullptr );
const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope ); // const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope );
for( int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_CHANNELS ), frame = 0; frame < SCOPE_SIZE; ) for( int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_CHANNELS ), frame = 0; frame < SCOPE_SIZE; )
{ {
MyNode *best_node = nullptr; MyNode *best_node = nullptr;
@ -631,7 +631,7 @@ VideoWindow::scope()
diff = m_current_vpts; diff = m_current_vpts;
diff -= best_node->vpts; diff -= best_node->vpts;
diff *= 1<<16; diff *= 1<<16;
diff /= pts_per_smpls; // diff /= pts_per_smpls;
const int16_t* const int16_t*
data16 = best_node->mem; data16 = best_node->mem;

@ -136,8 +136,6 @@ namespace Codeine
void becomePreferredSize(); void becomePreferredSize();
TQImage captureFrame() const; TQImage captureFrame() const;
enum { ExposeEvent = 3000 };
public slots: public slots:
void resetZoom(); void resetZoom();

Loading…
Cancel
Save