Browse Source

Explicitly mark unused parameters

This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
pull/1574/head
Pierre Ossman 1 year ago
parent
commit
3a1c46ff75
81 changed files with 207 additions and 163 deletions
  1. 1
    1
      common/rdr/MemInStream.h
  2. 2
    2
      common/rfb/CConnection.cxx
  3. 7
    6
      common/rfb/CMsgHandler.cxx
  4. 2
    0
      common/rfb/Congestion.cxx
  5. 6
    3
      common/rfb/CopyRectDecoder.cxx
  6. 11
    6
      common/rfb/Decoder.cxx
  7. 1
    1
      common/rfb/EncodeManager.cxx
  8. 4
    3
      common/rfb/Encoder.h
  9. 6
    3
      common/rfb/H264Decoder.cxx
  10. 3
    2
      common/rfb/H264DecoderContext.h
  11. 2
    1
      common/rfb/HextileEncoder.cxx
  12. 5
    6
      common/rfb/InputHandler.h
  13. 1
    1
      common/rfb/JpegCompressor.cxx
  14. 1
    1
      common/rfb/JpegDecompressor.cxx
  15. 1
    1
      common/rfb/LogWriter.cxx
  16. 1
    1
      common/rfb/Logger_file.cxx
  17. 2
    2
      common/rfb/PixelBuffer.cxx
  18. 1
    1
      common/rfb/PixelBuffer.h
  19. 1
    1
      common/rfb/RREDecoder.cxx
  20. 1
    1
      common/rfb/RREEncoder.cxx
  21. 2
    1
      common/rfb/RawEncoder.cxx
  22. 11
    9
      common/rfb/SConnection.cxx
  23. 6
    6
      common/rfb/SDesktop.h
  24. 6
    6
      common/rfb/SMsgHandler.cxx
  25. 3
    3
      common/rfb/TightDecoder.cxx
  26. 1
    1
      common/rfb/TightEncoder.cxx
  27. 2
    1
      common/rfb/TightJPEGEncoder.cxx
  28. 1
    1
      common/rfb/UnixPasswordValidator.cxx
  29. 1
    1
      common/rfb/WinPasswdValidator.cxx
  30. 3
    2
      common/rfb/ZRLEDecoder.cxx
  31. 0
    4
      common/rfb/util.h
  32. 9
    5
      tests/perf/convperf.cxx
  33. 1
    1
      tests/perf/decperf.cxx
  34. 2
    3
      tests/perf/encperf.cxx
  35. 1
    1
      tests/perf/fbperf.cxx
  36. 1
    1
      tests/unit/conv.cxx
  37. 1
    1
      tests/unit/convertlf.cxx
  38. 1
    1
      tests/unit/emulatemb.cxx
  39. 1
    1
      tests/unit/gesturehandler.cxx
  40. 1
    1
      tests/unit/hostport.cxx
  41. 1
    1
      tests/unit/pixelformat.cxx
  42. 1
    1
      tests/unit/unicode.cxx
  43. 1
    1
      unix/tx/TXButton.h
  44. 1
    1
      unix/tx/TXCheckbox.h
  45. 1
    1
      unix/tx/TXDialog.h
  46. 1
    1
      unix/tx/TXLabel.h
  47. 7
    5
      unix/tx/TXWindow.h
  48. 1
    1
      unix/vncconfig/QueryConnectDialog.cxx
  49. 2
    2
      unix/vncconfig/vncconfig.cxx
  50. 5
    0
      unix/vncserver/vncsession.c
  51. 2
    1
      unix/x0vncserver/Image.cxx
  52. 2
    0
      unix/x0vncserver/RandrGlue.c
  53. 1
    1
      unix/x0vncserver/XDesktop.cxx
  54. 1
    1
      unix/x0vncserver/x0vncserver.cxx
  55. 2
    1
      vncviewer/CConn.cxx
  56. 5
    4
      vncviewer/DesktopWindow.cxx
  57. 10
    9
      vncviewer/OptionsDialog.cxx
  58. 2
    1
      vncviewer/PlatformPixelBuffer.cxx
  59. 6
    6
      vncviewer/ServerDialog.cxx
  60. 3
    1
      vncviewer/Surface_Win32.cxx
  61. 1
    1
      vncviewer/Viewport.cxx
  62. 3
    2
      vncviewer/Win32TouchHandler.cxx
  63. 4
    2
      vncviewer/fltk/Fl_Monitor_Arrangement.cxx
  64. 8
    4
      vncviewer/touch.cxx
  65. 2
    2
      vncviewer/vncviewer.cxx
  66. 2
    1
      win/rfb_win32/Dialog.cxx
  67. 2
    2
      win/rfb_win32/Dialog.h
  68. 2
    2
      win/rfb_win32/MonitorInfo.cxx
  69. 1
    1
      win/rfb_win32/RegConfig.cxx
  70. 1
    1
      win/rfb_win32/SecurityPage.cxx
  71. 1
    1
      win/vncconfig/Authentication.h
  72. 1
    1
      win/vncconfig/Desktop.h
  73. 1
    1
      win/vncconfig/Hooking.h
  74. 1
    1
      win/vncconfig/Inputs.h
  75. 1
    1
      win/vncconfig/Legacy.h
  76. 1
    1
      win/vncconfig/Sharing.h
  77. 1
    1
      win/vncconfig/vncconfig.cxx
  78. 1
    1
      win/winvnc/ControlPanel.cxx
  79. 2
    2
      win/winvnc/VNCServerService.cxx
  80. 1
    1
      win/winvnc/winvnc.cxx
  81. 2
    2
      win/wm_hooks/wm_hooks.cxx

+ 1
- 1
common/rdr/MemInStream.h View File

@@ -59,7 +59,7 @@ namespace rdr {

private:

bool overrun(size_t needed) { throw EndOfStream(); }
bool overrun(size_t /*needed*/) { throw EndOfStream(); }
const U8* start;
bool deleteWhenDone;
};

+ 2
- 2
common/rfb/CConnection.cxx View File

@@ -635,11 +635,11 @@ void CConnection::handleClipboardRequest()
{
}

void CConnection::handleClipboardAnnounce(bool available)
void CConnection::handleClipboardAnnounce(bool /*available*/)
{
}

void CConnection::handleClipboardData(const char* data)
void CConnection::handleClipboardData(const char* /*data*/)
{
}


+ 7
- 6
common/rfb/CMsgHandler.cxx View File

@@ -68,7 +68,8 @@ void CMsgHandler::setName(const char* name)
server.setName(name);
}

void CMsgHandler::fence(rdr::U32 flags, unsigned len, const char data[])
void CMsgHandler::fence(rdr::U32 /*flags*/, unsigned /*len*/,
const char /*data*/ [])
{
server.supportsFence = true;
}
@@ -150,7 +151,7 @@ void CMsgHandler::handleClipboardCaps(rdr::U32 flags, const rdr::U32* lengths)
server.setClipboardCaps(flags, lengths);
}

void CMsgHandler::handleClipboardRequest(rdr::U32 flags)
void CMsgHandler::handleClipboardRequest(rdr::U32 /*flags*/)
{
}

@@ -158,12 +159,12 @@ void CMsgHandler::handleClipboardPeek()
{
}

void CMsgHandler::handleClipboardNotify(rdr::U32 flags)
void CMsgHandler::handleClipboardNotify(rdr::U32 /*flags*/)
{
}

void CMsgHandler::handleClipboardProvide(rdr::U32 flags,
const size_t* lengths,
const rdr::U8* const* data)
void CMsgHandler::handleClipboardProvide(rdr::U32 /*flags*/,
const size_t* /*lengths*/,
const rdr::U8* const* /*data*/)
{
}

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

@@ -313,6 +313,8 @@ size_t Congestion::getBandwidth()

void Congestion::debugTrace(const char* filename, int fd)
{
(void)filename;
(void)fd;
#ifdef CONGESTION_TRACE
#ifdef __linux__
FILE *f;

+ 6
- 3
common/rfb/CopyRectDecoder.cxx View File

@@ -36,8 +36,10 @@ CopyRectDecoder::~CopyRectDecoder()
{
}

bool CopyRectDecoder::readRect(const Rect& r, rdr::InStream* is,
const ServerParams& server, rdr::OutStream* os)
bool CopyRectDecoder::readRect(const Rect& /*r*/,
rdr::InStream* is,
const ServerParams& /*server*/,
rdr::OutStream* os)
{
if (!is->hasData(4))
return false;
@@ -63,7 +65,8 @@ void CopyRectDecoder::getAffectedRegion(const Rect& rect,
}

void CopyRectDecoder::decodeRect(const Rect& r, const void* buffer,
size_t buflen, const ServerParams& server,
size_t buflen,
const ServerParams& /*server*/,
ModifiablePixelBuffer* pb)
{
rdr::MemInStream is(buffer, buflen);

+ 11
- 6
common/rfb/Decoder.cxx View File

@@ -45,17 +45,22 @@ Decoder::~Decoder()
{
}

void Decoder::getAffectedRegion(const Rect& rect, const void* buffer,
size_t buflen, const ServerParams& server,
void Decoder::getAffectedRegion(const Rect& rect,
const void* /*buffer*/,
size_t /*buflen*/,
const ServerParams& /*server*/,
Region* region)
{
region->reset(rect);
}

bool Decoder::doRectsConflict(const Rect& rectA, const void* bufferA,
size_t buflenA, const Rect& rectB,
const void* bufferB, size_t buflenB,
const ServerParams& server)
bool Decoder::doRectsConflict(const Rect& /*rectA*/,
const void* /*bufferA*/,
size_t /*buflenA*/,
const Rect& /*rectB*/,
const void* /*bufferB*/,
size_t /*buflenB*/,
const ServerParams& /*server*/)
{
return false;
}

+ 1
- 1
common/rfb/EncodeManager.cxx View File

@@ -1060,7 +1060,7 @@ void EncodeManager::OffsetPixelBuffer::update(const PixelFormat& pf,
setBuffer(width, height, (rdr::U8*)data_, stride_);
}

rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& r, int* stride)
rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& /*r*/, int* /*stride*/)
{
throw rfb::Exception("Invalid write attempt to OffsetPixelBuffer");
}

+ 4
- 3
common/rfb/Encoder.h View File

@@ -51,9 +51,10 @@ namespace rfb {
// checking the list of encodings in the connection parameters.
virtual bool isSupported()=0;

virtual void setCompressLevel(int level) {};
virtual void setQualityLevel(int level) {};
virtual void setFineQualityLevel(int quality, int subsampling) {};
virtual void setCompressLevel(int /*level*/) {};
virtual void setQualityLevel(int /*level*/) {};
virtual void setFineQualityLevel(int /*quality*/,
int /*subsampling*/) {};

virtual int getCompressLevel() { return -1; };
virtual int getQualityLevel() { return -1; };

+ 6
- 3
common/rfb/H264Decoder.cxx View File

@@ -65,8 +65,10 @@ H264DecoderContext* H264Decoder::findContext(const Rect& r)
return NULL;
}

bool H264Decoder::readRect(const Rect& r, rdr::InStream* is,
const ServerParams& server, rdr::OutStream* os)
bool H264Decoder::readRect(const Rect& /*r*/,
rdr::InStream* is,
const ServerParams& /*server*/,
rdr::OutStream* os)
{
rdr::U32 len;

@@ -92,7 +94,8 @@ bool H264Decoder::readRect(const Rect& r, rdr::InStream* is,
}

void H264Decoder::decodeRect(const Rect& r, const void* buffer,
size_t buflen, const ServerParams& server,
size_t buflen,
const ServerParams& /*server*/,
ModifiablePixelBuffer* pb)
{
rdr::MemInStream is(buffer, buflen);

+ 3
- 2
common/rfb/H264DecoderContext.h View File

@@ -33,8 +33,9 @@ namespace rfb {

virtual ~H264DecoderContext() = 0;

virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len,
ModifiablePixelBuffer* pb) {}
virtual void decode(const rdr::U8* /*h264_buffer*/,
rdr::U32 /*len*/,
ModifiablePixelBuffer* /*pb*/) {}
void reset();

inline bool isEqualRect(const Rect &r) const { return r.equals(rect); }

+ 2
- 1
common/rfb/HextileEncoder.cxx View File

@@ -63,7 +63,8 @@ bool HextileEncoder::isSupported()
return conn->client.supportsEncoding(encodingHextile);
}

void HextileEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
void HextileEncoder::writeRect(const PixelBuffer* pb,
const Palette& /*palette*/)
{
rdr::OutStream* os = conn->getOutStream();
switch (pb->getPF().bpp) {

+ 5
- 6
common/rfb/InputHandler.h View File

@@ -32,12 +32,11 @@ namespace rfb {
class InputHandler {
public:
virtual ~InputHandler() {}
virtual void keyEvent(rdr::U32 __unused_attr keysym,
rdr::U32 __unused_attr keycode,
bool __unused_attr down) { }
virtual void pointerEvent(const Point& __unused_attr pos,
int __unused_attr buttonMask) { }
virtual void clientCutText(const char* __unused_attr str) { }
virtual void keyEvent(rdr::U32 /*keysym*/, rdr::U32 /*keycode*/,
bool /*down*/) { }
virtual void pointerEvent(const Point& /*pos*/,
int /*buttonMask*/) { }
virtual void clientCutText(const char* /*str*/) { }
};

}

+ 1
- 1
common/rfb/JpegCompressor.cxx View File

@@ -252,7 +252,7 @@ void JpegCompressor::compress(const rdr::U8 *buf, int stride, const Rect& r,
delete[] rowPointer;
}

void JpegCompressor::writeBytes(const void* data, int length)
void JpegCompressor::writeBytes(const void* /*data*/, int /*length*/)
{
throw rdr::Exception("writeBytes() is not valid with a JpegCompressor instance. Use compress() instead.");
}

+ 1
- 1
common/rfb/JpegDecompressor.cxx View File

@@ -84,7 +84,7 @@ struct JPEG_SRC_MGR {
};

static void
JpegNoOp(j_decompress_ptr dinfo)
JpegNoOp(j_decompress_ptr /*dinfo*/)
{
}


+ 1
- 1
common/rfb/LogWriter.cxx View File

@@ -51,7 +51,7 @@ void LogWriter::setLevel(int level) {
}

void
LogWriter::listLogWriters(int width) {
LogWriter::listLogWriters(int /*width*/) {
// *** make this respect width...
LogWriter* current = log_writers;
fprintf(stderr, " ");

+ 1
- 1
common/rfb/Logger_file.cxx View File

@@ -45,7 +45,7 @@ Logger_File::~Logger_File()
delete mutex;
}

void Logger_File::write(int level, const char *logname, const char *message)
void Logger_File::write(int /*level*/, const char *logname, const char *message)
{
os::AutoMutex a(mutex);


+ 2
- 2
common/rfb/PixelBuffer.cxx View File

@@ -339,7 +339,7 @@ rdr::U8* FullFramePixelBuffer::getBufferRW(const Rect& r, int* stride_)
return &data[(r.tl.x + (r.tl.y * stride)) * (format.bpp/8)];
}

void FullFramePixelBuffer::commitBufferRW(const Rect& r)
void FullFramePixelBuffer::commitBufferRW(const Rect& /*r*/)
{
}

@@ -371,7 +371,7 @@ void FullFramePixelBuffer::setBuffer(int width, int height,
data = data_;
}

void FullFramePixelBuffer::setSize(int w, int h)
void FullFramePixelBuffer::setSize(int /*w*/, int /*h*/)
{
// setBuffer() should be used
throw rfb::Exception("Invalid call to FullFramePixelBuffer::setSize()");

+ 1
- 1
common/rfb/PixelBuffer.h View File

@@ -86,7 +86,7 @@ namespace rfb {
// Ensure that the specified rectangle of buffer is up to date.
// Overridden by derived classes implementing framebuffer access
// to copy the required display data into place.
virtual void grabRegion(const Region& __unused_attr region) {}
virtual void grabRegion(const Region& /*region*/) {}

protected:
PixelBuffer();

+ 1
- 1
common/rfb/RREDecoder.cxx View File

@@ -48,7 +48,7 @@ RREDecoder::~RREDecoder()
{
}

bool RREDecoder::readRect(const Rect& r, rdr::InStream* is,
bool RREDecoder::readRect(const Rect& /*r*/, rdr::InStream* is,
const ServerParams& server, rdr::OutStream* os)
{
rdr::U32 numRects;

+ 1
- 1
common/rfb/RREEncoder.cxx View File

@@ -107,7 +107,7 @@ void RREEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
mos.clear();
}

void RREEncoder::writeSolidRect(int width, int height,
void RREEncoder::writeSolidRect(int /*width*/, int /*height*/,
const PixelFormat& pf,
const rdr::U8* colour)
{

+ 2
- 1
common/rfb/RawEncoder.cxx View File

@@ -44,7 +44,8 @@ bool RawEncoder::isSupported()
return true;
}

void RawEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
void RawEncoder::writeRect(const PixelBuffer* pb,
const Palette& /*palette*/)
{
const rdr::U8* buffer;
int stride;

+ 11
- 9
common/rfb/SConnection.cxx View File

@@ -286,7 +286,7 @@ bool SConnection::processInitMsg()
return reader_->readClientInit();
}

bool SConnection::handleAuthFailureTimeout(Timer* t)
bool SConnection::handleAuthFailureTimeout(Timer* /*t*/)
{
if (state_ != RFBSTATE_SECURITY_FAILURE) {
close("SConnection::handleAuthFailureTimeout: invalid state");
@@ -452,7 +452,7 @@ void SConnection::authSuccess()
{
}

void SConnection::queryConnection(const char* userName)
void SConnection::queryConnection(const char* /*userName*/)
{
approveConnection(true);
}
@@ -491,14 +491,14 @@ void SConnection::approveConnection(bool accept, const char* reason)
}
}

void SConnection::clientInit(bool shared)
void SConnection::clientInit(bool /*shared*/)
{
writer_->writeServerInit(client.width(), client.height(),
client.pf(), client.name());
state_ = RFBSTATE_NORMAL;
}

void SConnection::close(const char* reason)
void SConnection::close(const char* /*reason*/)
{
state_ = RFBSTATE_CLOSING;
cleanup();
@@ -512,7 +512,8 @@ void SConnection::setPixelFormat(const PixelFormat& pf)
writeFakeColourMap();
}

void SConnection::framebufferUpdateRequest(const Rect& r, bool incremental)
void SConnection::framebufferUpdateRequest(const Rect& /*r*/,
bool /*incremental*/)
{
if (!readyForSetColourMapEntries) {
readyForSetColourMapEntries = true;
@@ -533,8 +534,9 @@ void SConnection::fence(rdr::U32 flags, unsigned len, const char data[])
writer()->writeFence(flags, len, data);
}

void SConnection::enableContinuousUpdates(bool enable,
int x, int y, int w, int h)
void SConnection::enableContinuousUpdates(bool /*enable*/,
int /*x*/, int /*y*/,
int /*w*/, int /*h*/)
{
}

@@ -542,11 +544,11 @@ void SConnection::handleClipboardRequest()
{
}

void SConnection::handleClipboardAnnounce(bool available)
void SConnection::handleClipboardAnnounce(bool /*available*/)
{
}

void SConnection::handleClipboardData(const char* data)
void SConnection::handleClipboardData(const char* /*data*/)
{
}


+ 6
- 6
common/rfb/SDesktop.h View File

@@ -84,9 +84,9 @@ namespace rfb {

// setScreenLayout() requests to reconfigure the framebuffer and/or
// the layout of screens.
virtual unsigned int setScreenLayout(int __unused_attr fb_width,
int __unused_attr fb_height,
const ScreenSet& __unused_attr layout) {
virtual unsigned int setScreenLayout(int /*fb_width*/,
int /*fb_height*/,
const ScreenSet& /*layout*/) {
return resultProhibited;
}

@@ -104,14 +104,14 @@ namespace rfb {
// handleClipboardAnnounce() is called to indicate a change in the
// clipboard on a client. Call VNCServer::requestClipboard() to
// access the actual data.
virtual void handleClipboardAnnounce(bool __unused_attr available) {}
virtual void handleClipboardAnnounce(bool /*available*/) {}

// handleClipboardData() is called when a client has sent over
// the clipboard data as a result of a previous call to
// VNCServer::requestClipboard(). Note that this function might
// never be called if the clipboard data was no longer available
// when the client received the request.
virtual void handleClipboardData(const char* __unused_attr data) {}
virtual void handleClipboardData(const char* /*data*/) {}

protected:
virtual ~SDesktop() {}
@@ -149,7 +149,7 @@ namespace rfb {
server = 0;
}
virtual void queryConnection(network::Socket* sock,
const char* userName) {
const char* /*userName*/) {
server->approveConnection(sock, true, NULL);
}


+ 6
- 6
common/rfb/SMsgHandler.cxx View File

@@ -40,7 +40,7 @@ SMsgHandler::~SMsgHandler()
{
}

void SMsgHandler::clientInit(bool shared)
void SMsgHandler::clientInit(bool /*shared*/)
{
}

@@ -118,7 +118,7 @@ void SMsgHandler::handleClipboardCaps(rdr::U32 flags, const rdr::U32* lengths)
client.setClipboardCaps(flags, lengths);
}

void SMsgHandler::handleClipboardRequest(rdr::U32 flags)
void SMsgHandler::handleClipboardRequest(rdr::U32 /*flags*/)
{
}

@@ -126,13 +126,13 @@ void SMsgHandler::handleClipboardPeek()
{
}

void SMsgHandler::handleClipboardNotify(rdr::U32 flags)
void SMsgHandler::handleClipboardNotify(rdr::U32 /*flags*/)
{
}

void SMsgHandler::handleClipboardProvide(rdr::U32 flags,
const size_t* lengths,
const rdr::U8* const* data)
void SMsgHandler::handleClipboardProvide(rdr::U32 /*flags*/,
const size_t* /*lengths*/,
const rdr::U8* const* /*data*/)
{
}


+ 3
- 3
common/rfb/TightDecoder.cxx View File

@@ -199,13 +199,13 @@ bool TightDecoder::readRect(const Rect& r, rdr::InStream* is,
return true;
}

bool TightDecoder::doRectsConflict(const Rect& rectA,
bool TightDecoder::doRectsConflict(const Rect& /*rectA*/,
const void* bufferA,
size_t buflenA,
const Rect& rectB,
const Rect& /*rectB*/,
const void* bufferB,
size_t buflenB,
const ServerParams& server)
const ServerParams& /*server*/)
{
rdr::U8 comp_ctl_a, comp_ctl_b;


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

@@ -102,7 +102,7 @@ void TightEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
}
}

void TightEncoder::writeSolidRect(int width, int height,
void TightEncoder::writeSolidRect(int /*width*/, int /*height*/,
const PixelFormat& pf,
const rdr::U8* colour)
{

+ 2
- 1
common/rfb/TightJPEGEncoder.cxx View File

@@ -112,7 +112,8 @@ int TightJPEGEncoder::getQualityLevel()
return qualityLevel;
}

void TightJPEGEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
void TightJPEGEncoder::writeRect(const PixelBuffer* pb,
const Palette& /*palette*/)
{
const rdr::U8* buffer;
int stride;

+ 1
- 1
common/rfb/UnixPasswordValidator.cxx View File

@@ -37,7 +37,7 @@ AliasParameter pam_service("pam_service", "Alias for PAMService",
int do_pam_auth(const char *service, const char *username,
const char *password);

bool UnixPasswordValidator::validateInternal(SConnection * sc,
bool UnixPasswordValidator::validateInternal(SConnection * /*sc*/,
const char *username,
const char *password)
{

+ 1
- 1
common/rfb/WinPasswdValidator.cxx View File

@@ -29,7 +29,7 @@
using namespace rfb;

// This method will only work for Windows NT, 2000, and XP (and possibly Vista)
bool WinPasswdValidator::validateInternal(rfb::SConnection* sc,
bool WinPasswdValidator::validateInternal(rfb::SConnection* /*sc*/,
const char* username,
const char* password)
{

+ 3
- 2
common/rfb/ZRLEDecoder.cxx View File

@@ -80,8 +80,9 @@ ZRLEDecoder::~ZRLEDecoder()
{
}

bool ZRLEDecoder::readRect(const Rect& r, rdr::InStream* is,
const ServerParams& server, rdr::OutStream* os)
bool ZRLEDecoder::readRect(const Rect& /*r*/, rdr::InStream* is,
const ServerParams& /*server*/,
rdr::OutStream* os)
{
rdr::U32 len;


+ 0
- 4
common/rfb/util.h View File

@@ -35,10 +35,6 @@ struct timeval;
# define __printf_attr(a, b)
#endif // __GNUC__

#ifndef __unused_attr
# define __unused_attr __attribute((__unused__))
#endif

namespace rfb {

// -=- Class to handle cleanup of arrays of characters

+ 9
- 5
tests/perf/convperf.cxx View File

@@ -41,7 +41,8 @@ struct TestEntry {
testfn fn;
};

static void testMemcpy(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
static void testMemcpy(rfb::PixelFormat &dstpf,
rfb::PixelFormat& /*srcpf*/,
rdr::U8 *dst, rdr::U8 *src)
{
int h;
@@ -53,19 +54,22 @@ static void testMemcpy(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
}
}

static void testBuffer(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
static void testBuffer(rfb::PixelFormat &dstpf,
rfb::PixelFormat &srcpf,
rdr::U8 *dst, rdr::U8 *src)
{
dstpf.bufferFromBuffer(dst, srcpf, src, tile, tile, fbsize, fbsize);
}

static void testToRGB(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
static void testToRGB(rfb::PixelFormat& /*dstpf*/,
rfb::PixelFormat &srcpf,
rdr::U8 *dst, rdr::U8 *src)
{
srcpf.rgbFromBuffer(dst, src, tile, fbsize, tile);
}

static void testFromRGB(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
static void testFromRGB(rfb::PixelFormat &dstpf,
rfb::PixelFormat& /*srcpf*/,
rdr::U8 *dst, rdr::U8 *src)
{
dstpf.bufferFromRGB(dst, src, tile, fbsize, tile);
@@ -120,7 +124,7 @@ static void doTests(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf)
printf("\n");
}

int main(int argc, char **argv)
int main(int /*argc*/, char** /*argv*/)
{
size_t bufsize;


+ 1
- 1
tests/perf/decperf.cxx View File

@@ -139,7 +139,7 @@ void CConn::initDone()
server.height()));
}

void CConn::setPixelFormat(const rfb::PixelFormat& pf)
void CConn::setPixelFormat(const rfb::PixelFormat& /*pf*/)
{
// Override format
CConnection::setPixelFormat(filePF);

+ 2
- 3
tests/perf/encperf.cxx View File

@@ -329,12 +329,11 @@ void SConn::getStats(double& ratio, unsigned long long& bytes,
manager->getStats(ratio, bytes, rawEquivalent);
}

void SConn::setAccessRights(AccessRights ar)
void SConn::setAccessRights(AccessRights)
{
}

void SConn::setDesktopSize(int fb_width, int fb_height,
const rfb::ScreenSet& layout)
void SConn::setDesktopSize(int, int, const rfb::ScreenSet&)
{
}


+ 1
- 1
tests/perf/fbperf.cxx View File

@@ -378,7 +378,7 @@ static void dotest(TestWindow* win)
1.0 / (delay + rate * 1920 * 1080));
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
TestWindow* win;


+ 1
- 1
tests/unit/conv.cxx View File

@@ -291,7 +291,7 @@ static void doTests(const rfb::PixelFormat &dstpf,
}
}

int main(int argc, char **argv)
int main(int /*argc*/, char** /*argv*/)
{
rfb::PixelFormat dstpf, srcpf;


+ 1
- 1
tests/unit/convertlf.cxx View File

@@ -84,7 +84,7 @@ static void testCRLF(const char* input, const char* expected)
rfb::strFree(output);
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
testLF("", "");
testLF("no EOL", "no EOL");

+ 1
- 1
tests/unit/emulatemb.cxx View File

@@ -461,7 +461,7 @@ void testDragAndRelease()
printf("OK\n");
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
testDisabledOption();


+ 1
- 1
tests/unit/gesturehandler.cxx View File

@@ -1233,7 +1233,7 @@ void testIgnore()
testIgnoreAfterGesture();
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
testOneTap();
testTwoTap();

+ 1
- 1
tests/unit/hostport.cxx View File

@@ -46,7 +46,7 @@ static void doTest(const char* hostAndPort,
rfb::strFree(host);
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
doTest(":5", "localhost", 5905);


+ 1
- 1
tests/unit/pixelformat.cxx View File

@@ -183,7 +183,7 @@ void is888Tests()
printf("\n");
}

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
sanityTests();
is888Tests();

+ 1
- 1
tests/unit/unicode.cxx View File

@@ -85,7 +85,7 @@ struct _utf8utf16 utf8utf16[] = {

#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a))

int main(int argc, char** argv)
int main(int /*argc*/, char** /*argv*/)
{
int failures;
size_t i;

+ 1
- 1
unix/tx/TXButton.h View File

@@ -91,7 +91,7 @@ private:
XDrawString(dpy, win(), gc, startx, starty, text.buf, strlen(text.buf));
}

virtual void handleEvent(TXWindow* w, XEvent* ev) {
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
switch (ev->type) {
case Expose:
paint();

+ 1
- 1
unix/tx/TXCheckbox.h View File

@@ -109,7 +109,7 @@ private:
text, strlen(text));
}

virtual void handleEvent(TXWindow* w, XEvent* ev) {
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
switch (ev->type) {
case Expose:
paint();

+ 1
- 1
unix/tx/TXDialog.h View File

@@ -82,7 +82,7 @@ public:
}

protected:
virtual void deleteWindow(TXWindow* w) {
virtual void deleteWindow(TXWindow* /*w*/) {
ok = false;
done = true;
unmap();

+ 1
- 1
unix/tx/TXLabel.h View File

@@ -108,7 +108,7 @@ private:
} while (text.buf[i] != 0);
}

virtual void handleEvent(TXWindow* w, XEvent* ev) {
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
switch (ev->type) {
case Expose:
paint();

+ 7
- 5
unix/tx/TXWindow.h View File

@@ -142,19 +142,21 @@ public:

// takeFocus() is called when the window has received keyboard focus from the
// window manager.
virtual void takeFocus(Time time) {}
virtual void takeFocus(Time /*time*/) {}

// selectionNotify() is called when the selection owner has replied to a
// request for information about a selection from the selection owner.
virtual void selectionNotify(XSelectionEvent* ev, Atom type, int format,
int nitems, void* data) {}
virtual void selectionNotify(XSelectionEvent* /*ev*/, Atom /*type*/,
int /*format*/, int /*nitems*/,
void* /*data*/) {}

// selectionRequest() is called when this window is the selection owner and
// another X client has requested the selection. It should set the given
// property on the given window to the value of the given selection,
// returning true if successful, false otherwise.
virtual bool selectionRequest(Window requestor,
Atom selection, Atom property) { return false;}
virtual bool selectionRequest(Window /*requestor*/,
Atom /*selection*/,
Atom /*property*/) { return false;}

// Static methods


+ 1
- 1
unix/vncconfig/QueryConnectDialog.cxx View File

@@ -74,7 +74,7 @@ void QueryConnectDialog::buttonActivate(TXButton* b) {
callback->queryRejected();
}
bool QueryConnectDialog::handleTimeout(rfb::Timer* t) {
bool QueryConnectDialog::handleTimeout(rfb::Timer* /*t*/) {
if (timeUntilReject-- == 0) {
unmap();
callback->queryTimedOut();

+ 2
- 2
unix/vncconfig/vncconfig.cxx View File

@@ -110,7 +110,7 @@ public:

// handleEvent()

virtual void handleEvent(TXWindow* w, XEvent* ev) {
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) {
if (ev->type == vncExtEventBase + VncExtQueryConnectNotify) {
vlog.debug("query connection event");
if (queryConnectDialog)
@@ -134,7 +134,7 @@ public:
}

// TXDeleteWindowCallback method
virtual void deleteWindow(TXWindow* w) {
virtual void deleteWindow(TXWindow* /*w*/) {
exit(1);
}


+ 5
- 0
unix/vncserver/vncsession.c View File

@@ -142,6 +142,7 @@ finish_daemon(void)
static void
sighandler(int sig)
{
(void)sig;
if (script > 0) {
kill(script, SIGTERM);
}
@@ -169,6 +170,10 @@ conv(int num_msg,
const struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr)
{
(void)num_msg;
(void)msg;
(void)resp;
(void)appdata_ptr;
/* Opening a session should not require a conversation */
return PAM_CONV_ERR;
}

+ 2
- 1
unix/x0vncserver/Image.cxx View File

@@ -208,7 +208,8 @@ void Image::updateRect(Image *src, int dst_x, int dst_y,

static bool caughtShmError = false;

static int ShmCreationXErrorHandler(Display *dpy, XErrorEvent *error)
static int ShmCreationXErrorHandler(Display* /*dpy*/,
XErrorEvent* /*error*/)
{
caughtShmError = true;
return 0;

+ 2
- 0
unix/x0vncserver/RandrGlue.c View File

@@ -505,11 +505,13 @@ int vncRandRReconfigureOutput(int outputIdx, int x, int y,

int vncRandRCanCreateOutputs(int extraOutputs)
{
(void)extraOutputs;
return 0;
}

int vncRandRCreateOutputs(int extraOutputs)
{
(void)extraOutputs;
return 0;
}


+ 1
- 1
unix/x0vncserver/XDesktop.cxx View File

@@ -545,7 +545,7 @@ void XDesktop::keyEvent(rdr::U32 keysym, rdr::U32 xtcode, bool down) {
#endif
}

void XDesktop::clientCutText(const char* str) {
void XDesktop::clientCutText(const char* /*str*/) {
}

ScreenSet XDesktop::computeScreenLayout()

+ 1
- 1
unix/x0vncserver/x0vncserver.cxx View File

@@ -108,7 +108,7 @@ static const char* defaultDesktopName()

static bool caughtSignal = false;

static void CleanupSignalHandler(int sig)
static void CleanupSignalHandler(int /*sig*/)
{
caughtSignal = true;
}

+ 2
- 1
vncviewer/CConn.cxx View File

@@ -399,7 +399,8 @@ void CConn::framebufferUpdateEnd()

// The rest of the callbacks are fairly self-explanatory...

void CConn::setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs)
void CConn::setColourMapEntries(int /*firstColour*/, int /*nColours*/,
rdr::U16* /*rgbs*/)
{
vlog.error(_("Invalid SetColourMapEntries from server!"));
}

+ 5
- 4
vncviewer/DesktopWindow.cxx View File

@@ -1031,7 +1031,8 @@ void DesktopWindow::fullscreen_on()
}

#if !defined(WIN32) && !defined(__APPLE__)
Bool eventIsFocusWithSerial(Display *display, XEvent *event, XPointer arg)
Bool eventIsFocusWithSerial(Display* /*display*/, XEvent *event,
XPointer arg)
{
unsigned long serial;

@@ -1270,7 +1271,7 @@ void DesktopWindow::handleResizeTimeout(void *data)
}


void DesktopWindow::reconfigureFullscreen(void *data)
void DesktopWindow::reconfigureFullscreen(void* /*data*/)
{
std::set<DesktopWindow *>::iterator iter;

@@ -1495,7 +1496,7 @@ void DesktopWindow::repositionWidgets()
vscroll->value(vscroll->clamp(vscroll->value()));
}

void DesktopWindow::handleClose(Fl_Widget *wnd, void *data)
void DesktopWindow::handleClose(Fl_Widget* /*wnd*/, void* /*data*/)
{
disconnect();
}
@@ -1552,7 +1553,7 @@ void DesktopWindow::scrollTo(int x, int y)
damage(FL_DAMAGE_SCROLL);
}

void DesktopWindow::handleScroll(Fl_Widget *widget, void *data)
void DesktopWindow::handleScroll(Fl_Widget* /*widget*/, void *data)
{
DesktopWindow *self = (DesktopWindow *)data;


+ 10
- 9
vncviewer/OptionsDialog.cxx View File

@@ -1050,7 +1050,7 @@ void OptionsDialog::createMiscPage(int tx, int ty, int tw, int th)
}


void OptionsDialog::handleAutoselect(Fl_Widget *widget, void *data)
void OptionsDialog::handleAutoselect(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1067,7 +1067,7 @@ void OptionsDialog::handleAutoselect(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleCompression(Fl_Widget *widget, void *data)
void OptionsDialog::handleCompression(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1078,7 +1078,7 @@ void OptionsDialog::handleCompression(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleJpeg(Fl_Widget *widget, void *data)
void OptionsDialog::handleJpeg(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1090,7 +1090,7 @@ void OptionsDialog::handleJpeg(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleX509(Fl_Widget *widget, void *data)
void OptionsDialog::handleX509(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1104,7 +1104,7 @@ void OptionsDialog::handleX509(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleRSAAES(Fl_Widget *widget, void *data)
void OptionsDialog::handleRSAAES(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1115,8 +1115,9 @@ void OptionsDialog::handleRSAAES(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleClipboard(Fl_Widget *widget, void *data)
void OptionsDialog::handleClipboard(Fl_Widget* /*widget*/, void *data)
{
(void)data;
#if !defined(WIN32) && !defined(__APPLE__)
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1131,7 +1132,7 @@ void OptionsDialog::handleClipboard(Fl_Widget *widget, void *data)
#endif
}

void OptionsDialog::handleFullScreenMode(Fl_Widget *widget, void *data)
void OptionsDialog::handleFullScreenMode(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1142,7 +1143,7 @@ void OptionsDialog::handleFullScreenMode(Fl_Widget *widget, void *data)
}
}

void OptionsDialog::handleCancel(Fl_Widget *widget, void *data)
void OptionsDialog::handleCancel(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;

@@ -1150,7 +1151,7 @@ void OptionsDialog::handleCancel(Fl_Widget *widget, void *data)
}


void OptionsDialog::handleOK(Fl_Widget *widget, void *data)
void OptionsDialog::handleOK(Fl_Widget* /*widget*/, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;


+ 2
- 1
vncviewer/PlatformPixelBuffer.cxx View File

@@ -135,7 +135,8 @@ rfb::Rect PlatformPixelBuffer::getDamage(void)

static bool caughtError;

static int XShmAttachErrorHandler(Display *dpy, XErrorEvent *error)
static int XShmAttachErrorHandler(Display* /*dpy*/,
XErrorEvent* /*error*/)
{
caughtError = true;
return 0;

+ 6
- 6
vncviewer/ServerDialog.cxx View File

@@ -157,13 +157,13 @@ void ServerDialog::run(const char* servername, char *newservername)
newservername[VNCSERVERNAMELEN - 1] = '\0';
}

void ServerDialog::handleOptions(Fl_Widget *widget, void *data)
void ServerDialog::handleOptions(Fl_Widget* /*widget*/, void* /*data*/)
{
OptionsDialog::showDialog();
}


void ServerDialog::handleLoad(Fl_Widget *widget, void *data)
void ServerDialog::handleLoad(Fl_Widget* /*widget*/, void* data)
{
ServerDialog *dialog = (ServerDialog*)data;

@@ -201,7 +201,7 @@ void ServerDialog::handleLoad(Fl_Widget *widget, void *data)
}


void ServerDialog::handleSaveAs(Fl_Widget *widget, void *data)
void ServerDialog::handleSaveAs(Fl_Widget* /*widget*/, void* data)
{
ServerDialog *dialog = (ServerDialog*)data;
const char* servername = dialog->serverName->value();
@@ -261,13 +261,13 @@ void ServerDialog::handleSaveAs(Fl_Widget *widget, void *data)
}


void ServerDialog::handleAbout(Fl_Widget *widget, void *data)
void ServerDialog::handleAbout(Fl_Widget* /*widget*/, void* /*data*/)
{
about_vncviewer();
}


void ServerDialog::handleCancel(Fl_Widget *widget, void *data)
void ServerDialog::handleCancel(Fl_Widget* /*widget*/, void* data)
{
ServerDialog *dialog = (ServerDialog*)data;

@@ -276,7 +276,7 @@ void ServerDialog::handleCancel(Fl_Widget *widget, void *data)
}


void ServerDialog::handleConnect(Fl_Widget *widget, void *data)
void ServerDialog::handleConnect(Fl_Widget* /*widget*/, void *data)
{
ServerDialog *dialog = (ServerDialog*)data;
const char* servername = dialog->serverName->value();

+ 3
- 1
vncviewer/Surface_Win32.cxx View File

@@ -93,7 +93,9 @@ void Surface::draw(Surface* dst, int src_x, int src_y, int x, int y, int w, int
DeleteDC(dstdc);
}

void Surface::blend(int src_x, int src_y, int x, int y, int w, int h, int a)
void Surface::blend(int /*src_x*/, int /*src_y*/,
int /*x*/, int /*y*/, int /*w*/, int /*h*/,
int /*a*/)
{
// Compositing doesn't work properly for window DC:s
assert(false);

+ 1
- 1
vncviewer/Viewport.cxx View File

@@ -114,7 +114,7 @@ enum { ID_DISCONNECT, ID_FULLSCREEN, ID_MINIMIZE, ID_RESIZE,
static const WORD SCAN_FAKE = 0xaa;
#endif

Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
Viewport::Viewport(int w, int h, const rfb::PixelFormat& /*serverPF*/, CConn* cc_)
: Fl_Widget(0, 0, w, h), cc(cc_), frameBuffer(NULL),
lastPointerPos(0, 0), lastButtonMask(0),
#ifdef WIN32

+ 3
- 2
vncviewer/Win32TouchHandler.cxx View File

@@ -59,7 +59,8 @@ Win32TouchHandler::Win32TouchHandler(HWND hWnd) :
supportedTouches);
}

bool Win32TouchHandler::processEvent(UINT Msg, WPARAM wParam, LPARAM lParam)
bool Win32TouchHandler::processEvent(UINT Msg, WPARAM /*wParam*/,
LPARAM lParam)
{
GESTUREINFO gi;

@@ -386,7 +387,7 @@ void Win32TouchHandler::fakeButtonEvent(bool press, int button,
}

void Win32TouchHandler::fakeKeyEvent(bool press, int keysym,
const GestureEvent origEvent)
const GestureEvent /*origEvent*/)
{
UINT Msg = press ? WM_KEYDOWN : WM_KEYUP;
WPARAM wParam;

+ 4
- 2
vncviewer/fltk/Fl_Monitor_Arrangement.cxx View File

@@ -362,7 +362,8 @@ std::string Fl_Monitor_Arrangement::description(int m)

#if defined(WIN32)
static BOOL CALLBACK EnumDisplayMonitorsCallback(
HMONITOR monitor, HDC deviceContext, LPRECT rect, LPARAM userData)
HMONITOR monitor, HDC /*deviceContext*/, LPRECT /*rect*/,
LPARAM userData)
{
std::set<HMONITOR>* sys_monitors = (std::set<HMONITOR>*)userData;
sys_monitors->insert(monitor);
@@ -549,7 +550,8 @@ int Fl_Monitor_Arrangement::fltk_event_handler(int event)
return 0;
}

void Fl_Monitor_Arrangement::monitor_pressed(Fl_Widget *widget, void *user_data)
void Fl_Monitor_Arrangement::monitor_pressed(Fl_Widget* /*widget*/,
void *user_data)
{
Fl_Monitor_Arrangement *self = (Fl_Monitor_Arrangement *) user_data;


+ 8
- 4
vncviewer/touch.cxx View File

@@ -61,8 +61,9 @@ static HandlerMap handlers;

#if defined(WIN32)
LRESULT CALLBACK win32WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam,
LPARAM lParam, UINT_PTR uIdSubclass,
DWORD_PTR dwRefData)
LPARAM lParam,
UINT_PTR /*uIdSubclass*/,
DWORD_PTR /*dwRefData*/)
{
bool handled = false;

@@ -168,7 +169,7 @@ void x11_ungrab_pointer(Window window)
}
#endif

static int handleTouchEvent(void *event, void *data)
static int handleTouchEvent(void *event, void* /*data*/)
{
#if defined(WIN32)
MSG *msg = (MSG*)event;
@@ -189,7 +190,10 @@ static int handleTouchEvent(void *event, void *data)
(int)GetLastError());
}
}
#elif !defined(__APPLE__)
#elif defined(__APPLE__)
// No touch support on macOS
(void)event;
#else
XEvent *xevent = (XEvent*)event;

if (xevent->type == MapNotify) {

+ 2
- 2
vncviewer/vncviewer.cxx View File

@@ -232,12 +232,12 @@ static void mainloop(const char* vncserver, network::Socket* sock)
}

#ifdef __APPLE__
static void about_callback(Fl_Widget *widget, void *data)
static void about_callback(Fl_Widget* /*widget*/, void* /*data*/)
{
about_vncviewer();
}

static void new_connection_cb(Fl_Widget *widget, void *data)
static void new_connection_cb(Fl_Widget* /*widget*/, void* /*data*/)
{
const char *argv[2];
pid_t pid;

+ 2
- 1
win/rfb_win32/Dialog.cxx View File

@@ -229,7 +229,7 @@ struct DLGTEMPLATEEX {
short cy;
};

static int CALLBACK removeCtxtHelp(HWND hwnd, UINT message, LPARAM lParam) {
static int CALLBACK removeCtxtHelp(HWND /*hwnd*/, UINT message, LPARAM lParam) {
if (message == PSCB_PRECREATE) {
// Remove the context-help style, to remove the titlebar ? button
// *** Nasty hack to cope with new & old dialog template formats...
@@ -280,6 +280,7 @@ bool PropSheet::showPropSheet(HWND owner, bool showApply, bool showCtxtHelp, boo
centerWindow(handle, owner);
plog.info("created %p", handle);

(void)capture;
#ifdef _DIALOG_CAPTURE
if (capture) {
plog.info("capturing \"%s\"", (const char*)CStr(title.buf));

+ 2
- 2
win/rfb_win32/Dialog.h View File

@@ -60,13 +60,13 @@ namespace rfb {
// onCommand() is called upon receipt of a WM_COMMAND message item other than IDOK
// or IDCANCEL. It should return true if the command has been handled.

virtual bool onCommand(int item, int cmd) { return false; }
virtual bool onCommand(int /*item*/, int /*cmd*/) { return false; }

// onHelp() is called upon receipt of a WM_MENU message. This indicates that
// context-specific help should be displayed, for a dialog control, for example.
// It should return true if the command has been handled.

virtual bool onHelp(int item) { return false; }
virtual bool onHelp(int /*item*/) { return false; }

// onOk() is called when the OK button is pressed. The hwnd argument is the
// dialog box's window handle.

+ 2
- 2
win/rfb_win32/MonitorInfo.cxx View File

@@ -79,8 +79,8 @@ struct monitorByNameData {
};

static BOOL CALLBACK monitorByNameEnumProc(HMONITOR monitor,
HDC dc,
LPRECT pos,
HDC /*dc*/,
LPRECT /*pos*/,
LPARAM d) {
monitorByNameData* data = (monitorByNameData*)d;
memset(data->info, 0, sizeof(MONITORINFOEXA));

+ 1
- 1
win/rfb_win32/RegConfig.cxx View File

@@ -73,7 +73,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) {
}
}

void RegConfig::processEvent(HANDLE event_) {
void RegConfig::processEvent(HANDLE /*event*/) {
vlog.info("registry changed");

// Reinstate the registry change notifications

+ 1
- 1
win/rfb_win32/SecurityPage.cxx View File

@@ -106,7 +106,7 @@ SecurityPage::initDialog()
}

bool
SecurityPage::onCommand(int id, int cmd)
SecurityPage::onCommand(int id, int /*cmd*/)
{
if (id == IDC_ENC_X509) {
if (isItemChecked(IDC_ENC_X509))

+ 1
- 1
win/vncconfig/Authentication.h View File

@@ -149,7 +149,7 @@ namespace rfb {
setItemChecked(enc_idc, enable);
setItemChecked(auth_idc, enable);
}
inline bool showFileChooser(const RegKey& rk,
inline bool showFileChooser(const RegKey& /*rk*/,
const char* title,
const char* filter,
HWND hwnd)

+ 1
- 1
win/vncconfig/Desktop.h View File

@@ -40,7 +40,7 @@ namespace rfb {
setItemChecked(IDC_REMOVE_WALLPAPER, rfb::win32::SDisplay::removeWallpaper);
setItemChecked(IDC_DISABLE_EFFECTS, rfb::win32::SDisplay::disableEffects);
}
bool onCommand(int id, int cmd) {
bool onCommand(int id, int /*cmd*/) {
switch (id) {
case IDC_DISCONNECT_LOGOFF:
case IDC_DISCONNECT_LOCK:

+ 1
- 1
win/vncconfig/Hooking.h View File

@@ -39,7 +39,7 @@ namespace rfb {
setItemChecked(IDC_CAPTUREBLT, rfb::win32::DeviceFrameBuffer::useCaptureBlt);
onCommand(IDC_USEHOOKS, 0);
}
bool onCommand(int id, int cmd) {
bool onCommand(int id, int /*cmd*/) {
switch (id) {
case IDC_USEPOLLING:
case IDC_USEHOOKS:

+ 1
- 1
win/vncconfig/Inputs.h View File

@@ -49,7 +49,7 @@ namespace rfb {
enableAffectSSaver = false;
enableItem(IDC_AFFECT_SCREENSAVER, enableAffectSSaver);
}
bool onCommand(int id, int cmd) {
bool onCommand(int /*id*/, int /*cmd*/) {
BOOL inputResetsBlocked;
SystemParametersInfo(SPI_GETBLOCKSENDINPUTRESETS, 0, &inputResetsBlocked, 0);
setChanged((rfb::Server::acceptKeyEvents != isItemChecked(IDC_ACCEPT_KEYS)) ||

+ 1
- 1
win/vncconfig/Legacy.h View File

@@ -39,7 +39,7 @@ namespace rfb {
void initDialog() {
setItemChecked(IDC_PROTOCOL_3_3, rfb::Server::protocol3_3);
}
bool onCommand(int id, int cmd) {
bool onCommand(int id, int /*cmd*/) {
switch (id) {
case IDC_LEGACY_IMPORT:
{

+ 1
- 1
win/vncconfig/Sharing.h View File

@@ -36,7 +36,7 @@ namespace rfb {
setItemChecked(IDC_SHARE_ALWAYS, rfb::Server::alwaysShared);
setItemChecked(IDC_SHARE_CLIENT, !(rfb::Server::neverShared || rfb::Server::alwaysShared));
}
bool onCommand(int id, int cmd) {
bool onCommand(int /*id*/, int /*cmd*/) {
setChanged((isItemChecked(IDC_DISCONNECT_CLIENTS) != rfb::Server::disconnectClients) ||
(isItemChecked(IDC_SHARE_NEVER) != rfb::Server::neverShared) ||
(isItemChecked(IDC_SHARE_ALWAYS) != rfb::Server::alwaysShared));

+ 1
- 1
win/vncconfig/vncconfig.cxx View File

@@ -76,7 +76,7 @@ processParams(int argc, char* argv[]) {
}


int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, char* cmdLine, int cmdShow) {
int WINAPI WinMain(HINSTANCE inst, HINSTANCE /*prev*/, char* /*cmdLine*/, int /*cmdShow*/) {

// Configure debugging output
#ifdef _DEBUG

+ 1
- 1
win/winvnc/ControlPanel.cxx View File

@@ -102,7 +102,7 @@ void ControlPanel::UpdateListView(ListConnInfo* LCInfo)
}
}

BOOL ControlPanel::dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
BOOL ControlPanel::dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM /*lParam*/)
{
switch (msg) {
case WM_INITDIALOG:

+ 2
- 2
win/winvnc/VNCServerService.cxx View File

@@ -101,7 +101,7 @@ BOOL GetSessionUserTokenWin(OUT LPHANDLE lphUserToken)

//////////////////////////////////////////////////////////////////////////////
// START the app as system
HANDLE LaunchProcessWin(DWORD dwSessionId)
HANDLE LaunchProcessWin(DWORD /*dwSessionId*/)
{
HANDLE hProcess = NULL;
HANDLE hToken = NULL;
@@ -125,7 +125,7 @@ HANDLE LaunchProcessWin(DWORD dwSessionId)
return hProcess;
}

DWORD VNCServerService::serviceMain(int argc, TCHAR* argv[])
DWORD VNCServerService::serviceMain(int /*argc*/, TCHAR* /*argv*/ [])
{
ConsoleSessionId OlddwSessionId;


+ 1
- 1
win/winvnc/winvnc.cxx View File

@@ -238,7 +238,7 @@ static void processParams(int argc, char** argv) {
// -=- main
//

int WINAPI WinMain(HINSTANCE inst, HINSTANCE prevInst, char* cmdLine, int cmdShow) {
int WINAPI WinMain(HINSTANCE /*inst*/, HINSTANCE /*prevInst*/, char* /*cmdLine*/, int /*cmdShow*/) {
int result = 0;

try {

+ 2
- 2
win/wm_hooks/wm_hooks.cxx View File

@@ -73,7 +73,7 @@ ATOM ATOM_Popup_Selection = GlobalAddAtom(_T("RFB.WM_Hooks.PopupSelectionAtom"))

HINSTANCE dll_instance = 0;

BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID reserved) {
BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID /*reserved*/) {
switch (reason) {
case DLL_PROCESS_ATTACH:
dll_instance = (HINSTANCE)instance;
@@ -144,7 +144,7 @@ bool NotifyCursor(HCURSOR cursor) {
return NotifyHookOwner(WM_HK_CursorChanged, 0, (LPARAM)cursor);
}

void ProcessWindowMessage(UINT msg, HWND wnd, WPARAM wParam, LPARAM lParam) {
void ProcessWindowMessage(UINT msg, HWND wnd, WPARAM wParam, LPARAM /*lParam*/) {
#ifdef _DEBUG
if ((msg >= diagnostic_min) && (msg <= diagnostic_max))
PostThreadMessage(hook_owner, WM_HK_Diagnostic, msg, (LPARAM)wnd);

Loading…
Cancel
Save