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
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; | ||||
}; | }; |
{ | { | ||||
} | } | ||||
void CConnection::handleClipboardAnnounce(bool available) | |||||
void CConnection::handleClipboardAnnounce(bool /*available*/) | |||||
{ | { | ||||
} | } | ||||
void CConnection::handleClipboardData(const char* data) | |||||
void CConnection::handleClipboardData(const char* /*data*/) | |||||
{ | { | ||||
} | } | ||||
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*/) | |||||
{ | { | ||||
} | } |
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; |
{ | { | ||||
} | } | ||||
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); |
{ | { | ||||
} | } | ||||
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; | ||||
} | } |
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"); | ||||
} | } |
// 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; }; |
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); |
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); } |
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) { |
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*/) { } | |||||
}; | }; | ||||
} | } |
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."); | ||||
} | } |
}; | }; | ||||
static void | static void | ||||
JpegNoOp(j_decompress_ptr dinfo) | |||||
JpegNoOp(j_decompress_ptr /*dinfo*/) | |||||
{ | { | ||||
} | } | ||||
} | } | ||||
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, " "); |
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); | ||||
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()"); |
// 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(); |
{ | { | ||||
} | } | ||||
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; |
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) | ||||
{ | { |
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; |
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*/) | |||||
{ | { | ||||
} | } | ||||
// 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); | ||||
} | } | ||||
{ | { | ||||
} | } | ||||
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*/) | |||||
{ | { | ||||
} | } | ||||
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; | ||||
} | } | ||||
} | } | ||||
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) | ||||
{ | { |
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; |
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) | ||||
{ | { |
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) | ||||
{ | { |
{ | { | ||||
} | } | ||||
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; | ||||
# 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 |
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; | ||||
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); |
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.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; | ||||
} | } | ||||
} | } | ||||
int main(int argc, char **argv) | |||||
int main(int /*argc*/, char** /*argv*/) | |||||
{ | { | ||||
rfb::PixelFormat dstpf, srcpf; | rfb::PixelFormat dstpf, srcpf; | ||||
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"); |
printf("OK\n"); | printf("OK\n"); | ||||
} | } | ||||
int main(int argc, char** argv) | |||||
int main(int /*argc*/, char** /*argv*/) | |||||
{ | { | ||||
testDisabledOption(); | testDisabledOption(); | ||||
testIgnoreAfterGesture(); | testIgnoreAfterGesture(); | ||||
} | } | ||||
int main(int argc, char** argv) | |||||
int main(int /*argc*/, char** /*argv*/) | |||||
{ | { | ||||
testOneTap(); | testOneTap(); | ||||
testTwoTap(); | testTwoTap(); |
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); | ||||
printf("\n"); | printf("\n"); | ||||
} | } | ||||
int main(int argc, char** argv) | |||||
int main(int /*argc*/, char** /*argv*/) | |||||
{ | { | ||||
sanityTests(); | sanityTests(); | ||||
is888Tests(); | is888Tests(); |
#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; |
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(); |
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(); |
} | } | ||||
protected: | protected: | ||||
virtual void deleteWindow(TXWindow* w) { | |||||
virtual void deleteWindow(TXWindow* /*w*/) { | |||||
ok = false; | ok = false; | ||||
done = true; | done = true; | ||||
unmap(); | unmap(); |
} 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(); |
// 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 | ||||
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(); |
// 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); | ||||
} | } | ||||
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; | ||||
} | } |
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; |
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; | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
void XDesktop::clientCutText(const char* str) { | |||||
void XDesktop::clientCutText(const char* /*str*/) { | |||||
} | } | ||||
ScreenSet XDesktop::computeScreenLayout() | ScreenSet XDesktop::computeScreenLayout() |
static bool caughtSignal = false; | static bool caughtSignal = false; | ||||
static void CleanupSignalHandler(int sig) | |||||
static void CleanupSignalHandler(int /*sig*/) | |||||
{ | { | ||||
caughtSignal = true; | caughtSignal = true; | ||||
} | } |
// 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!")); | ||||
} | } |
} | } | ||||
#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; | ||||
} | } | ||||
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; | ||||
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; |
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(); |
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); |
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 |
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; |
#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; | ||||
#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) { |
} | } | ||||
#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; |
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)); |
// 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. |
}; | }; | ||||
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)); |
} | } | ||||
} | } | ||||
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 |
} | } | ||||
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)) |
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) |
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: |
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: |
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)) || |
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: | ||||
{ | { |
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)); |
} | } | ||||
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 |
} | } | ||||
} | } | ||||
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: |
////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////// | ||||
// 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; | ||||
// -=- 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 { |
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); |