Skip to content

Commit

Permalink
tidy: Remove redundant control flow statements.
Browse files Browse the repository at this point in the history
Clang-tidy pointed out where functions that don't return a value end
with a 'return' statement.  Changes made by the clang-tidy program.

These problems were pointed out by clang-tidy's "redundant control
flow" check.

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-control-flow.html
  • Loading branch information
linuxdude42 committed Mar 20, 2019
1 parent 2c901c4 commit 5eabd02
Show file tree
Hide file tree
Showing 29 changed files with 5 additions and 54 deletions.
1 change: 0 additions & 1 deletion mythplugins/mythgallery/mythgallery/glsingleview.cpp
Expand Up @@ -728,7 +728,6 @@ void GLSingleView::EffectNone(void)
paintTexture();
m_effect_running = false;
m_slideshow_frame_delay_state = -1;
return;
}

void GLSingleView::EffectBlend(void)
Expand Down
2 changes: 0 additions & 2 deletions mythplugins/mythgallery/mythgallery/singleview.cpp
Expand Up @@ -767,7 +767,6 @@ void SingleView::EffectNone(void)
m_effect_running = false;
m_slideshow_frame_delay_state = -1;
update();
return;
}

void SingleView::EffectChessboard(void)
Expand Down Expand Up @@ -1351,7 +1350,6 @@ void SingleView::EffectNoise(void)
m_slideshow_frame_delay_state = -1;
m_effect_running = false;
update();
return;
}

void SingleView::SlideTimeout(void)
Expand Down
4 changes: 0 additions & 4 deletions mythplugins/mythmusic/mythmusic/visualize.cpp
Expand Up @@ -946,8 +946,6 @@ void Piano::zero_analysis(void)
m_piano_data[key].samples_processed = 0;
}
m_offset_processed = 0;

return;
}

void Piano::resize(const QSize &newsize)
Expand Down Expand Up @@ -1031,8 +1029,6 @@ void Piano::resize(const QSize &newsize)
{
m_magnitude[key] = 0.0;
}

return;
}

unsigned long Piano::getDesiredSamples(void)
Expand Down
2 changes: 0 additions & 2 deletions mythplugins/mythweather/mythweather/sourceManager.cpp
Expand Up @@ -394,6 +394,4 @@ void SourceManager::recurseDirs( QDir dir )
}
}
}

return;
}
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputjack.cpp
Expand Up @@ -561,7 +561,7 @@ void AudioOutputJACK::WriteAudio(unsigned char *aubuf, int size)
{
(void)aubuf;
(void)size;
return; // unneeded and unused in JACK
// unneeded and unused in JACK
}

/* **********************************************
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputnull.h
Expand Up @@ -32,7 +32,7 @@ class AudioOutputNULL : public AudioOutputBase
int GetVolumeChannel(int /* channel */) const override // VolumeBase
{ return 100; }
void SetVolumeChannel(int /* channel */, int /* volume */) override // VolumeBase
{return;}
{}

int readOutputData(unsigned char *read_buffer, int max_length) override; // AudioOutputBase

Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythbase/lcddevice.cpp
Expand Up @@ -538,7 +538,6 @@ void LCD::setupLEDs(int(*LedMaskFunc)(void))
void LCD::outputLEDs()
{
/* now implemented elsewhere for advanced icon control */
return;
#if 0
if (!lcd_ready)
return;
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythbase/mythlocale.cpp
Expand Up @@ -201,7 +201,6 @@ void MythLocale::ResetToStandardDefaults(void)
// TODO Not implemented yet, delete everything in m_globalSettings
// from the database then let the standard defaults populate them
// again. Used if the user wants to revert the changes
return;
}

QString MythLocale::GetLocaleSetting(const QString &key)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythbase/mythsocket.cpp
Expand Up @@ -795,7 +795,6 @@ void MythSocket::WriteStringListReal(const QStringList *list, bool *ret)
m_tcpSocket->flush();

*ret = true;
return;
}

void MythSocket::ReadStringListReal(
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
Expand Up @@ -501,7 +501,6 @@ void MythAirplayServer::Start(void)
m_serviceRefresh->start(2000);
}
m_valid = true;
return;
}

void MythAirplayServer::timeout(void)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Expand Up @@ -1756,7 +1756,6 @@ void MythRAOPConnection::newEventClient(QTcpSocket *client)

m_eventClients.append(client);
connect(client, SIGNAL(disconnected()), this, SLOT(deleteEventClient()));
return;
}

void MythRAOPConnection::deleteEventClient(void)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
Expand Up @@ -143,7 +143,6 @@ void MythRAOPDevice::Start(void)
}

m_valid = true;
return;
}

void MythRAOPDevice::Stop(void)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/Bluray/mythbdplayer.h
Expand Up @@ -65,7 +65,7 @@ class MythBDPlayer : public MythPlayer
// Disable screen grabs for Bluray
void SeekForScreenGrab(uint64_t &/*number*/, uint64_t /*frameNum*/,
bool /*absolute*/) override // MythPlayer
{ return; }
{}

private:
void DisplayMenu(void);
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Expand Up @@ -588,7 +588,6 @@ class HLSStream
break;
}
}
return;
}

void RemoveSegment(int segnum, bool willdelete = true)
Expand All @@ -601,8 +600,8 @@ class HLSStream
delete segment;
}
m_segments.removeAt(segnum);
return;
}

void RemoveListSegments(QMap<HLSSegment*,bool> &table)
{
QMap<HLSSegment*,bool>::iterator it;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/avformatdecoder.cpp
Expand Up @@ -2798,8 +2798,8 @@ bool AvFormatDecoder::DoRewindSeek(long long desiredFrame)
void AvFormatDecoder::DoFastForwardSeek(long long desiredFrame, bool &needflush)
{
DecoderBase::DoFastForwardSeek(desiredFrame, needflush);
return;
}

///Returns TeleText language
int AvFormatDecoder::GetTeletextLanguage(uint lang_idx) const
{
Expand Down
3 changes: 0 additions & 3 deletions mythtv/libs/libmythtv/dsmcc.cpp
Expand Up @@ -302,7 +302,6 @@ void Dsmcc::ProcessDownloadInfoIndication(const unsigned char *data,
dii.m_private_data_len = (data[off] << 8) | data[off + 1];

car->AddModuleInfo(&dii, this, streamTag);
return;
}

// DSI or DII message.
Expand Down Expand Up @@ -435,8 +434,6 @@ void Dsmcc::ProcessSectionData(const unsigned char *data, int length)
LOG(VB_DSMCC, LOG_WARNING, QString("[dsmcc] Data Block ModID %1 Pos %2"
" unknown carousel %3")
.arg(ddb.m_module_id).arg(ddb.m_block_number).arg(download_id));

return;
}

void Dsmcc::ProcessSectionDesc(const unsigned char *data, int length)
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/eitcache.cpp
Expand Up @@ -115,8 +115,6 @@ static void delete_in_db(uint endtime)

if (!query.exec())
MythDB::DBError("Error deleting old eitcache entries.", query);

return;
}


Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -6124,7 +6124,6 @@ void MythPlayer::syncWithAudioStretch()
.arg((disable_passthrough) ? "disable" : "allow"));
SetDisablePassThrough(disable_passthrough);
}
return;
}

void MythPlayer::SetDisablePassThrough(bool disabled)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/recorders/NuppelVideoRecorder.cpp
Expand Up @@ -1906,7 +1906,6 @@ void NuppelVideoRecorder::BufferIt(unsigned char *buf, int len, bool forcekey)
if (m_act_video_buffer >= m_video_buffer_count)
m_act_video_buffer = 0; // cycle to begin of buffer
videobuffer[act]->freeToEncode = 1; // set last to prevent race
return;
}

inline void NuppelVideoRecorder::WriteFrameheader(rtframeheader *fh)
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/recorders/firewirerecorder.cpp
Expand Up @@ -139,8 +139,6 @@ void FirewireRecorder::AddData(const unsigned char *data, uint len)
}

m_buffer.erase(m_buffer.begin(), m_buffer.begin() + sync_at);

return;
}

bool FirewireRecorder::ProcessTSPacket(const TSPacket &tspacket)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/recorders/vbitext/vbi.c
Expand Up @@ -468,7 +468,6 @@ vbi_del_handler(struct vbi *vbi, void *handler, void *data)
dl_remove(cl->node);
break;
}
return;
}

#ifdef USING_V4L2
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/videobuffers.cpp
Expand Up @@ -495,8 +495,6 @@ void VideoBuffers::Enqueue(BufferType type, VideoFrame *frame)
q->remove(frame);
q->enqueue(frame);
m_globalLock.unlock();

return;
}

void VideoBuffers::Remove(BufferType type, VideoFrame *frame)
Expand Down
Expand Up @@ -263,6 +263,5 @@ void zoom_filter_xmmx (int prevX, int prevY,
(void) expix1; (void) expix2;
(void) brutS; (void) brutD;
(void) buffratio; (void) precalCoef;
return;
}
#endif
1 change: 0 additions & 1 deletion mythtv/libs/libmythui/mythuiimage.cpp
Expand Up @@ -915,7 +915,6 @@ void MythUIImage::ForceSize(const QSize &size)
SetSize(m_imageProperties.m_forceSize);

Load();
return;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythui/mythuitextedit.cpp
Expand Up @@ -422,8 +422,6 @@ static void LoadDeadKeys(QMap<QPair<int, int>, int> &map)

map[keyCombo(Qt::Key_Dead_Acute, Qt::Key_Y)] = Qt::Key_Yacute;
map[keyCombo(Qt::Key_Dead_Diaeresis, Qt::Key_Y)] = Qt::Key_ydiaeresis;

return;
}

bool MythUITextEdit::keyPressEvent(QKeyEvent *event)
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythui/mythuitype.cpp
Expand Up @@ -975,7 +975,6 @@ bool MythUIType::keyPressEvent(QKeyEvent * /*event*/)

void MythUIType::customEvent(QEvent * /*event*/)
{
return;
}

/** \brief Mouse click/movement handler, receives mouse gesture events from the
Expand All @@ -994,7 +993,6 @@ bool MythUIType::gestureEvent(MythGestureEvent * /*event*/)
*/
void MythUIType::mediaEvent(MythMediaEvent * /*event*/)
{
return;
}

void MythUIType::LoseFocus(void)
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythupnp/msocketdevice_unix.cpp
Expand Up @@ -116,8 +116,6 @@ static inline void qt_socket_getportaddr(struct sockaddr *sa,
*port = ntohs(sa4->sin_port);

*addr = QHostAddress(ntohl(sa4->sin_addr.s_addr));

return;
}

// internal
Expand Down
12 changes: 0 additions & 12 deletions mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -2821,8 +2821,6 @@ void MainServer::HandleCheckRecordingActive(QStringList &slist,
QStringList outputlist( QString::number(result) );
if (pbssock)
SendResponse(pbssock, outputlist);

return;
}

void MainServer::HandleStopRecording(QStringList &slist, PlaybackSock *pbs)
Expand Down Expand Up @@ -5625,8 +5623,6 @@ void MainServer::HandleCutMapQuery(const QString &chanid,

if (pbssock)
SendResponse(pbssock, retlist);

return;
}

void MainServer::HandleCommBreakQuery(const QString &chanid,
Expand Down Expand Up @@ -5688,8 +5684,6 @@ void MainServer::HandleBookmarkQuery(const QString &chanid,

if (pbssock)
SendResponse(pbssock, retlist);

return;
}


Expand Down Expand Up @@ -5730,8 +5724,6 @@ void MainServer::HandleSetBookmark(QStringList &tokens,

if (pbssock)
SendResponse(pbssock, retlist);

return;
}

void MainServer::HandleSettingQuery(QStringList &tokens, PlaybackSock *pbs)
Expand All @@ -5752,8 +5744,6 @@ void MainServer::HandleSettingQuery(QStringList &tokens, PlaybackSock *pbs)
retlist << retvalue;
if (pbssock)
SendResponse(pbssock, retlist);

return;
}

void MainServer::HandleDownloadFile(const QStringList &command,
Expand Down Expand Up @@ -5850,8 +5840,6 @@ void MainServer::HandleSetSetting(QStringList &tokens,

if (pbssock)
SendResponse(pbssock, retlist);

return;
}

void MainServer::HandleScanVideos(PlaybackSock *pbs)
Expand Down
1 change: 0 additions & 1 deletion mythtv/programs/mythtranscode/external/replex/pes.c
Expand Up @@ -392,7 +392,6 @@ void get_pes (pes_in_t *p, uint8_t *buf, int count, void (*func)(pes_in_t *p))
}
}
} while(!done);
return;
}


Expand Down

0 comments on commit 5eabd02

Please sign in to comment.