Browse Source

Fix compiler warnings uncovered with -Wall


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4752 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.1.90
DRC 12 years ago
parent
commit
28c6bcc9b6
4 changed files with 3 additions and 4 deletions
  1. 2
    1
      common/rfb/ColourMap.h
  2. 1
    0
      common/rfb/ImageGetter.h
  3. 0
    2
      common/rfb/PixelFormat.cxx
  4. 0
    1
      common/rfb/TightEncoder.cxx

+ 2
- 1
common/rfb/ColourMap.h View File

@@ -30,12 +30,13 @@ namespace rfb {
class ColourMap {
public:
virtual void lookup(int index, int* r, int* g, int* b)=0;
virtual ~ColourMap() {}
};

class SimpleColourMap : public ColourMap {
public:
SimpleColourMap(int size = 256) { table = new Colour[size]; };
~SimpleColourMap() { delete [] table; };
virtual ~SimpleColourMap() { delete [] table; };

void lookup(int index, int* r, int* g, int* b)
{ *r = table[index].r; *g = table[index].g; *b = table[index].b; };

+ 1
- 0
common/rfb/ImageGetter.h View File

@@ -25,6 +25,7 @@ namespace rfb {
public:
virtual void getImage(void* imageBuf,
const Rect& r, int stride=0) = 0;
virtual ~ImageGetter() {}
};
}
#endif

+ 0
- 2
common/rfb/PixelFormat.cxx View File

@@ -299,8 +299,6 @@ void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src, int pixels, Co
void PixelFormat::rgbFromBuffer(rdr::U8* dst, const rdr::U8* src,
int w, int pitch, int h, ColourMap* cm) const
{
rdr::U8 *rowptr, *colptr;

if (is888()) {
// Optimised common case
int rindex, gindex, bindex;

+ 0
- 1
common/rfb/TightEncoder.cxx View File

@@ -317,7 +317,6 @@ bool TightEncoder::writeRect(const Rect& _r, TransImageGetter* _ig,
Rect sr, bestr;
int dx, dy, dw, dh;
rdr::U32 colorValue;
int maxRectSize = pconf->maxRectSize;
int maxRectWidth = pconf->maxRectWidth;
int nMaxWidth = (w > maxRectWidth) ? maxRectWidth : w;
int nMaxRows = pconf->maxRectSize / nMaxWidth;

Loading…
Cancel
Save