Skip to content

Commit

Permalink
cppcheck: Fix "assigned but never used" warnings.
Browse files Browse the repository at this point in the history
Reduce the scope of these variables so the analyzer doesn't complain.
  • Loading branch information
linuxdude42 committed Jul 10, 2022
1 parent 3e40bb2 commit ca25225
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mythmusic/mythmusic/bumpscope.cpp
Expand Up @@ -243,10 +243,8 @@ inline void BumpScope::draw_vert_line(unsigned char *buffer, int x, int y1,

void BumpScope::render_light(int lx, int ly)
{
int dx = 0;
int dy = 0;
unsigned int PHONGRES = m_phongRad * 2;
unsigned int i = 0;
unsigned int j = 0;

int prev_y = m_bpl + 1;
Expand All @@ -256,6 +254,8 @@ void BumpScope::render_light(int lx, int ly)
for (dy = (-ly) + (PHONGRES / 2), j = 0; j < m_height; j++, dy++,
prev_y += m_bpl - m_width)
{
int dx = 0;
unsigned int i = 0;
for (dx = (-lx) + (PHONGRES / 2), i = 0; i < m_width; i++, dx++,
prev_y++, out_y++)
{
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmyth/mediamonitor-darwin.cpp
Expand Up @@ -45,7 +45,6 @@ MythMediaType FindMediaType(io_service_t service)
io_iterator_t iter;
MythMediaType mediaType = MEDIATYPE_UNKNOWN;
QString msg = QString("FindMediaType() - ");
bool isWholeMedia = false;

// Create an iterator across all parents of the service object passed in.
kernResult = IORegistryEntryCreateIterator(service,
Expand Down Expand Up @@ -73,7 +72,7 @@ MythMediaType FindMediaType(io_service_t service)

do
{
isWholeMedia = false;
bool isWholeMedia = false;
if (IOObjectConformsTo(service, kIOMediaClass))
{
CFTypeRef wholeMedia;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/DVD/mythdvdbuffer.cpp
Expand Up @@ -525,7 +525,6 @@ int MythDVDBuffer::SafeRead(void *Buffer, uint Size)
int needed = static_cast<int>(Size);
char* dest = static_cast<char*>(Buffer);
int offset = 0;
bool reprocessing { false };
bool waiting = false;

if (m_gotStop)
Expand All @@ -540,6 +539,7 @@ int MythDVDBuffer::SafeRead(void *Buffer, uint Size)

while ((m_processState != PROCESS_WAIT) && needed)
{
bool reprocessing { false };
blockBuf = m_dvdBlockWriteBuf.data();

if (m_processState == PROCESS_REPROCESS)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/ClassicCommDetector.cpp
Expand Up @@ -396,7 +396,6 @@ bool ClassicCommDetector::go()
}


float flagFPS { 0.0 };
float aspect = m_player->GetVideoAspect();
int prevpercent = -1;

Expand Down Expand Up @@ -492,6 +491,7 @@ bool ClassicCommDetector::go()
((m_showProgress || m_stillRecording) &&
((currentFrameNumber % 100) == 0)))
{
float flagFPS { 0.0 };
float elapsed = flagTime.elapsed() / 1000.0;

if (elapsed != 0.0F)
Expand Down

0 comments on commit ca25225

Please sign in to comment.