Skip to content

Commit

Permalink
Fix compile warnings only seen on linux-ppc
Browse files Browse the repository at this point in the history
Most of these are just Altivec or MMX stuff not properly #ifdef'd.  There's
also a unsigned vs signed issue, and one where size - 1 <= size.
  • Loading branch information
Beirdo committed May 8, 2011
1 parent d3befcf commit de18a3f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mythtv/filters/greedyhdeint/color.c
Expand Up @@ -231,14 +231,14 @@ static void yv12_to_yuy2_c

#endif

#if HAVE_MMX
static void yv12_to_yuy2_mmxext
(const unsigned char *y_src, int y_src_pitch,
const unsigned char *u_src, int u_src_pitch,
const unsigned char *v_src, int v_src_pitch,
unsigned char *yuy2_map, int yuy2_pitch,
int width, int height, int progressive )
{
#if HAVE_MMX
uint8_t *p_line1, *p_line2 = yuy2_map;
const uint8_t *p_y1, *p_y2 = y_src;
const uint8_t *p_u = u_src;
Expand Down Expand Up @@ -472,14 +472,14 @@ static void yuy2_to_yv12_c

#endif

#if HAVE_MMX
static void yuy2_to_yv12_mmxext
(const unsigned char *yuy2_map, int yuy2_pitch,
unsigned char *y_dst, int y_dst_pitch,
unsigned char *u_dst, int u_dst_pitch,
unsigned char *v_dst, int v_dst_pitch,
int width, int height)
{
#if HAVE_MMX
const uint8_t *p_line1, *p_line2 = yuy2_map;
uint8_t *p_y1, *p_y2 = y_dst;
uint8_t *p_u = u_dst;
Expand Down
1 change: 1 addition & 0 deletions mythtv/filters/linearblend/filter_linearblend.c
Expand Up @@ -32,6 +32,7 @@ typedef struct LBFilter
void linearBlend(unsigned char *src, int stride);
void linearBlendMMX(unsigned char *src, int stride);
void linearBlend3DNow(unsigned char *src, int stride);
inline void linearBlendAltivec(unsigned char *src, int stride);
int linearBlendFilterAltivec(VideoFilter *f, VideoFrame *frame, int field);

#ifdef MMX
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/livetvchain.cpp
Expand Up @@ -247,9 +247,9 @@ void LiveTVChain::GetEntryAt(int at, LiveTVChainEntry &entry) const
QMutexLocker lock(&m_lock);

int size = m_chain.count();
int new_at = (at < 0 || at >= size) ? size - 1 : at;
int new_at = (size && (at < 0 || at >= size)) ? size - 1 : at;

if (new_at >= 0 && new_at <= size)
if (size && new_at >= 0 && new_at <= size)
entry = m_chain[new_at];
else
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/osdchromakey.cpp
Expand Up @@ -228,7 +228,7 @@ void ChromaKeyOSD::BlendOrCopy(uint32_t colour, const QRect &rect)
source += src_stride >> 1;
dest += dst_stride >> 1;
#else
for (uint j = 0; j < width; j++)
for (int j = 0; j < width; j++)
dest[j] = (source[j] & MASK) ? source[j] : colour;
source += src_stride;
dest += dst_stride;
Expand Down

0 comments on commit de18a3f

Please sign in to comment.