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



private: private:


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

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

{ {
} }


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

server.setName(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; server.supportsFence = true;
} }
server.setClipboardCaps(flags, lengths); server.setClipboardCaps(flags, lengths);
} }


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


{ {
} }


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



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

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

{ {
} }


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)) if (!is->hasData(4))
return false; return false;
} }


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

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

{ {
} }


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* region)
{ {
region->reset(rect); 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; return false;
} }

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

setBuffer(width, height, (rdr::U8*)data_, stride_); 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"); throw rfb::Exception("Invalid write attempt to OffsetPixelBuffer");
} }

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

// checking the list of encodings in the connection parameters. // checking the list of encodings in the connection parameters.
virtual bool isSupported()=0; 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 getCompressLevel() { return -1; };
virtual int getQualityLevel() { return -1; }; virtual int getQualityLevel() { return -1; };

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

return NULL; 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; rdr::U32 len;


} }


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

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



virtual ~H264DecoderContext() = 0; 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(); void reset();


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

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

return conn->client.supportsEncoding(encodingHextile); 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(); rdr::OutStream* os = conn->getOutStream();
switch (pb->getPF().bpp) { switch (pb->getPF().bpp) {

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

class InputHandler { class InputHandler {
public: public:
virtual ~InputHandler() {} 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

delete[] rowPointer; 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."); throw rdr::Exception("writeBytes() is not valid with a JpegCompressor instance. Use compress() instead.");
} }

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

}; };


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



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

} }


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

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

delete mutex; 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); os::AutoMutex a(mutex);



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

return &data[(r.tl.x + (r.tl.y * stride)) * (format.bpp/8)]; return &data[(r.tl.x + (r.tl.y * stride)) * (format.bpp/8)];
} }


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


data = data_; data = data_;
} }


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

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

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


protected: protected:
PixelBuffer(); PixelBuffer();

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

{ {
} }


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

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

mos.clear(); mos.clear();
} }


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

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

return true; return true;
} }


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

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

return reader_->readClientInit(); return reader_->readClientInit();
} }


bool SConnection::handleAuthFailureTimeout(Timer* t)
bool SConnection::handleAuthFailureTimeout(Timer* /*t*/)
{ {
if (state_ != RFBSTATE_SECURITY_FAILURE) { if (state_ != RFBSTATE_SECURITY_FAILURE) {
close("SConnection::handleAuthFailureTimeout: invalid state"); close("SConnection::handleAuthFailureTimeout: invalid state");
{ {
} }


void SConnection::queryConnection(const char* userName)
void SConnection::queryConnection(const char* /*userName*/)
{ {
approveConnection(true); approveConnection(true);
} }
} }
} }


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


void SConnection::close(const char* reason)
void SConnection::close(const char* /*reason*/)
{ {
state_ = RFBSTATE_CLOSING; state_ = RFBSTATE_CLOSING;
cleanup(); cleanup();
writeFakeColourMap(); writeFakeColourMap();
} }


void SConnection::framebufferUpdateRequest(const Rect& r, bool incremental)
void SConnection::framebufferUpdateRequest(const Rect& /*r*/,
bool /*incremental*/)
{ {
if (!readyForSetColourMapEntries) { if (!readyForSetColourMapEntries) {
readyForSetColourMapEntries = true; readyForSetColourMapEntries = true;
writer()->writeFence(flags, len, 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*/)
{ {
} }


{ {
} }


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



// setScreenLayout() requests to reconfigure the framebuffer and/or // setScreenLayout() requests to reconfigure the framebuffer and/or
// the layout of screens. // 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; return resultProhibited;
} }


// handleClipboardAnnounce() is called to indicate a change in the // handleClipboardAnnounce() is called to indicate a change in the
// clipboard on a client. Call VNCServer::requestClipboard() to // clipboard on a client. Call VNCServer::requestClipboard() to
// access the actual data. // 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 // handleClipboardData() is called when a client has sent over
// the clipboard data as a result of a previous call to // the clipboard data as a result of a previous call to
// VNCServer::requestClipboard(). Note that this function might // VNCServer::requestClipboard(). Note that this function might
// never be called if the clipboard data was no longer available // never be called if the clipboard data was no longer available
// when the client received the request. // when the client received the request.
virtual void handleClipboardData(const char* __unused_attr data) {}
virtual void handleClipboardData(const char* /*data*/) {}


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



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

{ {
} }


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


client.setClipboardCaps(flags, lengths); client.setClipboardCaps(flags, lengths);
} }


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


{ {
} }


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

return true; return true;
} }


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



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

} }
} }


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

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

return qualityLevel; return qualityLevel;
} }


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

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

int do_pam_auth(const char *service, const char *username, int do_pam_auth(const char *service, const char *username,
const char *password); const char *password);


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

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

using namespace rfb; using namespace rfb;


// This method will only work for Windows NT, 2000, and XP (and possibly Vista) // 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* username,
const char* password) const char* password)
{ {

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

{ {
} }


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; rdr::U32 len;



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

# define __printf_attr(a, b) # define __printf_attr(a, b)
#endif // __GNUC__ #endif // __GNUC__


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

namespace rfb { namespace rfb {


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

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

testfn fn; 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) rdr::U8 *dst, rdr::U8 *src)
{ {
int h; int h;
} }
} }


static void testBuffer(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf,
static void testBuffer(rfb::PixelFormat &dstpf,
rfb::PixelFormat &srcpf,
rdr::U8 *dst, rdr::U8 *src) rdr::U8 *dst, rdr::U8 *src)
{ {
dstpf.bufferFromBuffer(dst, srcpf, src, tile, tile, fbsize, fbsize); 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) rdr::U8 *dst, rdr::U8 *src)
{ {
srcpf.rgbFromBuffer(dst, src, tile, fbsize, tile); 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) rdr::U8 *dst, rdr::U8 *src)
{ {
dstpf.bufferFromRGB(dst, src, tile, fbsize, tile); dstpf.bufferFromRGB(dst, src, tile, fbsize, tile);
printf("\n"); printf("\n");
} }


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



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

server.height())); server.height()));
} }


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

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

manager->getStats(ratio, bytes, rawEquivalent); 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

1.0 / (delay + rate * 1920 * 1080)); 1.0 / (delay + rate * 1920 * 1080));
} }


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



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

} }
} }


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



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

rfb::strFree(output); rfb::strFree(output);
} }


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

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

printf("OK\n"); printf("OK\n");
} }


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



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

testIgnoreAfterGesture(); testIgnoreAfterGesture();
} }


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

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

rfb::strFree(host); rfb::strFree(host);
} }


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



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

printf("\n"); printf("\n");
} }


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

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



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


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

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

XDrawString(dpy, win(), gc, startx, starty, text.buf, strlen(text.buf)); 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) { switch (ev->type) {
case Expose: case Expose:
paint(); paint();

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

text, strlen(text)); text, strlen(text));
} }


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

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

} }


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

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

} while (text.buf[i] != 0); } while (text.buf[i] != 0);
} }


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

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



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


// selectionNotify() is called when the selection owner has replied to a // selectionNotify() is called when the selection owner has replied to a
// request for information about a selection from the selection owner. // 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 // selectionRequest() is called when this window is the selection owner and
// another X client has requested the selection. It should set the given // another X client has requested the selection. It should set the given
// property on the given window to the value of the given selection, // property on the given window to the value of the given selection,
// returning true if successful, false otherwise. // 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 // Static methods



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

callback->queryRejected(); callback->queryRejected();
} }
bool QueryConnectDialog::handleTimeout(rfb::Timer* t) {
bool QueryConnectDialog::handleTimeout(rfb::Timer* /*t*/) {
if (timeUntilReject-- == 0) { if (timeUntilReject-- == 0) {
unmap(); unmap();
callback->queryTimedOut(); callback->queryTimedOut();

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



// handleEvent() // handleEvent()


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


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



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

static void static void
sighandler(int sig) sighandler(int sig)
{ {
(void)sig;
if (script > 0) { if (script > 0) {
kill(script, SIGTERM); kill(script, SIGTERM);
} }
const struct pam_message **msg, const struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr) 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 */ /* Opening a session should not require a conversation */
return PAM_CONV_ERR; return PAM_CONV_ERR;
} }

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



static bool caughtShmError = false; static bool caughtShmError = false;


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

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



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


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



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

#endif #endif
} }


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


ScreenSet XDesktop::computeScreenLayout() ScreenSet XDesktop::computeScreenLayout()

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



static bool caughtSignal = false; static bool caughtSignal = false;


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

+ 2
- 1
vncviewer/CConn.cxx View File



// The rest of the callbacks are fairly self-explanatory... // 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!")); vlog.error(_("Invalid SetColourMapEntries from server!"));
} }

+ 5
- 4
vncviewer/DesktopWindow.cxx View File

} }


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


} }




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


vscroll->value(vscroll->clamp(vscroll->value())); vscroll->value(vscroll->clamp(vscroll->value()));
} }


void DesktopWindow::handleClose(Fl_Widget *wnd, void *data)
void DesktopWindow::handleClose(Fl_Widget* /*wnd*/, void* /*data*/)
{ {
disconnect(); disconnect();
} }
damage(FL_DAMAGE_SCROLL); damage(FL_DAMAGE_SCROLL);
} }


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



+ 10
- 9
vncviewer/OptionsDialog.cxx View File

} }




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


} }




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


} }




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


} }




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


} }




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


} }




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


#endif #endif
} }


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


} }
} }


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


} }




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



+ 2
- 1
vncviewer/PlatformPixelBuffer.cxx View File



static bool caughtError; static bool caughtError;


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

+ 6
- 6
vncviewer/ServerDialog.cxx View File

newservername[VNCSERVERNAMELEN - 1] = '\0'; newservername[VNCSERVERNAMELEN - 1] = '\0';
} }


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




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


} }




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




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




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


} }




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

+ 3
- 1
vncviewer/Surface_Win32.cxx View File

DeleteDC(dstdc); 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 // Compositing doesn't work properly for window DC:s
assert(false); assert(false);

+ 1
- 1
vncviewer/Viewport.cxx View File

static const WORD SCAN_FAKE = 0xaa; static const WORD SCAN_FAKE = 0xaa;
#endif #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), : Fl_Widget(0, 0, w, h), cc(cc_), frameBuffer(NULL),
lastPointerPos(0, 0), lastButtonMask(0), lastPointerPos(0, 0), lastButtonMask(0),
#ifdef WIN32 #ifdef WIN32

+ 3
- 2
vncviewer/Win32TouchHandler.cxx View File

supportedTouches); supportedTouches);
} }


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


} }


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

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



#if defined(WIN32) #if defined(WIN32)
static BOOL CALLBACK EnumDisplayMonitorsCallback( 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; std::set<HMONITOR>* sys_monitors = (std::set<HMONITOR>*)userData;
sys_monitors->insert(monitor); sys_monitors->insert(monitor);
return 0; 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; Fl_Monitor_Arrangement *self = (Fl_Monitor_Arrangement *) user_data;



+ 8
- 4
vncviewer/touch.cxx View File



#if defined(WIN32) #if defined(WIN32)
LRESULT CALLBACK win32WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, 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; bool handled = false;


} }
#endif #endif


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


if (xevent->type == MapNotify) { if (xevent->type == MapNotify) {

+ 2
- 2
vncviewer/vncviewer.cxx View File

} }


#ifdef __APPLE__ #ifdef __APPLE__
static void about_callback(Fl_Widget *widget, void *data)
static void about_callback(Fl_Widget* /*widget*/, void* /*data*/)
{ {
about_vncviewer(); 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]; const char *argv[2];
pid_t pid; pid_t pid;

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

short cy; 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) { if (message == PSCB_PRECREATE) {
// Remove the context-help style, to remove the titlebar ? button // Remove the context-help style, to remove the titlebar ? button
// *** Nasty hack to cope with new & old dialog template formats... // *** Nasty hack to cope with new & old dialog template formats...
centerWindow(handle, owner); centerWindow(handle, owner);
plog.info("created %p", handle); plog.info("created %p", handle);


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

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

// onCommand() is called upon receipt of a WM_COMMAND message item other than IDOK // 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. // 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 // 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. // context-specific help should be displayed, for a dialog control, for example.
// It should return true if the command has been handled. // 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 // onOk() is called when the OK button is pressed. The hwnd argument is the
// dialog box's window handle. // dialog box's window handle.

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

}; };


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

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

} }
} }


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


// Reinstate the registry change notifications // Reinstate the registry change notifications

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

} }


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

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

setItemChecked(enc_idc, enable); setItemChecked(enc_idc, enable);
setItemChecked(auth_idc, enable); setItemChecked(auth_idc, enable);
} }
inline bool showFileChooser(const RegKey& rk,
inline bool showFileChooser(const RegKey& /*rk*/,
const char* title, const char* title,
const char* filter, const char* filter,
HWND hwnd) HWND hwnd)

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

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

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

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

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

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

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

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

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

setItemChecked(IDC_SHARE_ALWAYS, rfb::Server::alwaysShared); setItemChecked(IDC_SHARE_ALWAYS, rfb::Server::alwaysShared);
setItemChecked(IDC_SHARE_CLIENT, !(rfb::Server::neverShared || 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) || setChanged((isItemChecked(IDC_DISCONNECT_CLIENTS) != rfb::Server::disconnectClients) ||
(isItemChecked(IDC_SHARE_NEVER) != rfb::Server::neverShared) || (isItemChecked(IDC_SHARE_NEVER) != rfb::Server::neverShared) ||
(isItemChecked(IDC_SHARE_ALWAYS) != rfb::Server::alwaysShared)); (isItemChecked(IDC_SHARE_ALWAYS) != rfb::Server::alwaysShared));

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

} }




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 // Configure debugging output
#ifdef _DEBUG #ifdef _DEBUG

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

} }
} }


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

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



////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// START the app as system // START the app as system
HANDLE LaunchProcessWin(DWORD dwSessionId)
HANDLE LaunchProcessWin(DWORD /*dwSessionId*/)
{ {
HANDLE hProcess = NULL; HANDLE hProcess = NULL;
HANDLE hToken = NULL; HANDLE hToken = NULL;
return hProcess; return hProcess;
} }


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



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

// -=- main // -=- 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; int result = 0;


try { try {

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



HINSTANCE dll_instance = 0; HINSTANCE dll_instance = 0;


BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID reserved) {
BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID /*reserved*/) {
switch (reason) { switch (reason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
dll_instance = (HINSTANCE)instance; dll_instance = (HINSTANCE)instance;
return NotifyHookOwner(WM_HK_CursorChanged, 0, (LPARAM)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 #ifdef _DEBUG
if ((msg >= diagnostic_min) && (msg <= diagnostic_max)) if ((msg >= diagnostic_min) && (msg <= diagnostic_max))
PostThreadMessage(hook_owner, WM_HK_Diagnostic, msg, (LPARAM)wnd); PostThreadMessage(hook_owner, WM_HK_Diagnostic, msg, (LPARAM)wnd);

Loading…
Cancel
Save