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
@@ -59,7 +59,7 @@ namespace rdr { | |||
private: | |||
bool overrun(size_t needed) { throw EndOfStream(); } | |||
bool overrun(size_t /*needed*/) { throw EndOfStream(); } | |||
const U8* start; | |||
bool deleteWhenDone; | |||
}; |
@@ -635,11 +635,11 @@ void CConnection::handleClipboardRequest() | |||
{ | |||
} | |||
void CConnection::handleClipboardAnnounce(bool available) | |||
void CConnection::handleClipboardAnnounce(bool /*available*/) | |||
{ | |||
} | |||
void CConnection::handleClipboardData(const char* data) | |||
void CConnection::handleClipboardData(const char* /*data*/) | |||
{ | |||
} | |||
@@ -68,7 +68,8 @@ void CMsgHandler::setName(const char* name) | |||
server.setName(name); | |||
} | |||
void CMsgHandler::fence(rdr::U32 flags, unsigned len, const char data[]) | |||
void CMsgHandler::fence(rdr::U32 /*flags*/, unsigned /*len*/, | |||
const char /*data*/ []) | |||
{ | |||
server.supportsFence = true; | |||
} | |||
@@ -150,7 +151,7 @@ void CMsgHandler::handleClipboardCaps(rdr::U32 flags, const rdr::U32* lengths) | |||
server.setClipboardCaps(flags, lengths); | |||
} | |||
void CMsgHandler::handleClipboardRequest(rdr::U32 flags) | |||
void CMsgHandler::handleClipboardRequest(rdr::U32 /*flags*/) | |||
{ | |||
} | |||
@@ -158,12 +159,12 @@ void CMsgHandler::handleClipboardPeek() | |||
{ | |||
} | |||
void CMsgHandler::handleClipboardNotify(rdr::U32 flags) | |||
void CMsgHandler::handleClipboardNotify(rdr::U32 /*flags*/) | |||
{ | |||
} | |||
void CMsgHandler::handleClipboardProvide(rdr::U32 flags, | |||
const size_t* lengths, | |||
const rdr::U8* const* data) | |||
void CMsgHandler::handleClipboardProvide(rdr::U32 /*flags*/, | |||
const size_t* /*lengths*/, | |||
const rdr::U8* const* /*data*/) | |||
{ | |||
} |
@@ -313,6 +313,8 @@ size_t Congestion::getBandwidth() | |||
void Congestion::debugTrace(const char* filename, int fd) | |||
{ | |||
(void)filename; | |||
(void)fd; | |||
#ifdef CONGESTION_TRACE | |||
#ifdef __linux__ | |||
FILE *f; |
@@ -36,8 +36,10 @@ CopyRectDecoder::~CopyRectDecoder() | |||
{ | |||
} | |||
bool CopyRectDecoder::readRect(const Rect& r, rdr::InStream* is, | |||
const ServerParams& server, rdr::OutStream* os) | |||
bool CopyRectDecoder::readRect(const Rect& /*r*/, | |||
rdr::InStream* is, | |||
const ServerParams& /*server*/, | |||
rdr::OutStream* os) | |||
{ | |||
if (!is->hasData(4)) | |||
return false; | |||
@@ -63,7 +65,8 @@ void CopyRectDecoder::getAffectedRegion(const Rect& rect, | |||
} | |||
void CopyRectDecoder::decodeRect(const Rect& r, const void* buffer, | |||
size_t buflen, const ServerParams& server, | |||
size_t buflen, | |||
const ServerParams& /*server*/, | |||
ModifiablePixelBuffer* pb) | |||
{ | |||
rdr::MemInStream is(buffer, buflen); |
@@ -45,17 +45,22 @@ Decoder::~Decoder() | |||
{ | |||
} | |||
void Decoder::getAffectedRegion(const Rect& rect, const void* buffer, | |||
size_t buflen, const ServerParams& server, | |||
void Decoder::getAffectedRegion(const Rect& rect, | |||
const void* /*buffer*/, | |||
size_t /*buflen*/, | |||
const ServerParams& /*server*/, | |||
Region* region) | |||
{ | |||
region->reset(rect); | |||
} | |||
bool Decoder::doRectsConflict(const Rect& rectA, const void* bufferA, | |||
size_t buflenA, const Rect& rectB, | |||
const void* bufferB, size_t buflenB, | |||
const ServerParams& server) | |||
bool Decoder::doRectsConflict(const Rect& /*rectA*/, | |||
const void* /*bufferA*/, | |||
size_t /*buflenA*/, | |||
const Rect& /*rectB*/, | |||
const void* /*bufferB*/, | |||
size_t /*buflenB*/, | |||
const ServerParams& /*server*/) | |||
{ | |||
return false; | |||
} |
@@ -1060,7 +1060,7 @@ void EncodeManager::OffsetPixelBuffer::update(const PixelFormat& pf, | |||
setBuffer(width, height, (rdr::U8*)data_, stride_); | |||
} | |||
rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& r, int* stride) | |||
rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& /*r*/, int* /*stride*/) | |||
{ | |||
throw rfb::Exception("Invalid write attempt to OffsetPixelBuffer"); | |||
} |
@@ -51,9 +51,10 @@ namespace rfb { | |||
// checking the list of encodings in the connection parameters. | |||
virtual bool isSupported()=0; | |||
virtual void setCompressLevel(int level) {}; | |||
virtual void setQualityLevel(int level) {}; | |||
virtual void setFineQualityLevel(int quality, int subsampling) {}; | |||
virtual void setCompressLevel(int /*level*/) {}; | |||
virtual void setQualityLevel(int /*level*/) {}; | |||
virtual void setFineQualityLevel(int /*quality*/, | |||
int /*subsampling*/) {}; | |||
virtual int getCompressLevel() { return -1; }; | |||
virtual int getQualityLevel() { return -1; }; |
@@ -65,8 +65,10 @@ H264DecoderContext* H264Decoder::findContext(const Rect& r) | |||
return NULL; | |||
} | |||
bool H264Decoder::readRect(const Rect& r, rdr::InStream* is, | |||
const ServerParams& server, rdr::OutStream* os) | |||
bool H264Decoder::readRect(const Rect& /*r*/, | |||
rdr::InStream* is, | |||
const ServerParams& /*server*/, | |||
rdr::OutStream* os) | |||
{ | |||
rdr::U32 len; | |||
@@ -92,7 +94,8 @@ bool H264Decoder::readRect(const Rect& r, rdr::InStream* is, | |||
} | |||
void H264Decoder::decodeRect(const Rect& r, const void* buffer, | |||
size_t buflen, const ServerParams& server, | |||
size_t buflen, | |||
const ServerParams& /*server*/, | |||
ModifiablePixelBuffer* pb) | |||
{ | |||
rdr::MemInStream is(buffer, buflen); |
@@ -33,8 +33,9 @@ namespace rfb { | |||
virtual ~H264DecoderContext() = 0; | |||
virtual void decode(const rdr::U8* h264_buffer, rdr::U32 len, | |||
ModifiablePixelBuffer* pb) {} | |||
virtual void decode(const rdr::U8* /*h264_buffer*/, | |||
rdr::U32 /*len*/, | |||
ModifiablePixelBuffer* /*pb*/) {} | |||
void reset(); | |||
inline bool isEqualRect(const Rect &r) const { return r.equals(rect); } |
@@ -63,7 +63,8 @@ bool HextileEncoder::isSupported() | |||
return conn->client.supportsEncoding(encodingHextile); | |||
} | |||
void HextileEncoder::writeRect(const PixelBuffer* pb, const Palette& palette) | |||
void HextileEncoder::writeRect(const PixelBuffer* pb, | |||
const Palette& /*palette*/) | |||
{ | |||
rdr::OutStream* os = conn->getOutStream(); | |||
switch (pb->getPF().bpp) { |
@@ -32,12 +32,11 @@ namespace rfb { | |||
class InputHandler { | |||
public: | |||
virtual ~InputHandler() {} | |||
virtual void keyEvent(rdr::U32 __unused_attr keysym, | |||
rdr::U32 __unused_attr keycode, | |||
bool __unused_attr down) { } | |||
virtual void pointerEvent(const Point& __unused_attr pos, | |||
int __unused_attr buttonMask) { } | |||
virtual void clientCutText(const char* __unused_attr str) { } | |||
virtual void keyEvent(rdr::U32 /*keysym*/, rdr::U32 /*keycode*/, | |||
bool /*down*/) { } | |||
virtual void pointerEvent(const Point& /*pos*/, | |||
int /*buttonMask*/) { } | |||
virtual void clientCutText(const char* /*str*/) { } | |||
}; | |||
} |
@@ -252,7 +252,7 @@ void JpegCompressor::compress(const rdr::U8 *buf, int stride, const Rect& r, | |||
delete[] rowPointer; | |||
} | |||
void JpegCompressor::writeBytes(const void* data, int length) | |||
void JpegCompressor::writeBytes(const void* /*data*/, int /*length*/) | |||
{ | |||
throw rdr::Exception("writeBytes() is not valid with a JpegCompressor instance. Use compress() instead."); | |||
} |
@@ -84,7 +84,7 @@ struct JPEG_SRC_MGR { | |||
}; | |||
static void | |||
JpegNoOp(j_decompress_ptr dinfo) | |||
JpegNoOp(j_decompress_ptr /*dinfo*/) | |||
{ | |||
} | |||
@@ -51,7 +51,7 @@ void LogWriter::setLevel(int level) { | |||
} | |||
void | |||
LogWriter::listLogWriters(int width) { | |||
LogWriter::listLogWriters(int /*width*/) { | |||
// *** make this respect width... | |||
LogWriter* current = log_writers; | |||
fprintf(stderr, " "); |
@@ -45,7 +45,7 @@ Logger_File::~Logger_File() | |||
delete mutex; | |||
} | |||
void Logger_File::write(int level, const char *logname, const char *message) | |||
void Logger_File::write(int /*level*/, const char *logname, const char *message) | |||
{ | |||
os::AutoMutex a(mutex); | |||
@@ -339,7 +339,7 @@ rdr::U8* FullFramePixelBuffer::getBufferRW(const Rect& r, int* stride_) | |||
return &data[(r.tl.x + (r.tl.y * stride)) * (format.bpp/8)]; | |||
} | |||
void FullFramePixelBuffer::commitBufferRW(const Rect& r) | |||
void FullFramePixelBuffer::commitBufferRW(const Rect& /*r*/) | |||
{ | |||
} | |||
@@ -371,7 +371,7 @@ void FullFramePixelBuffer::setBuffer(int width, int height, | |||
data = data_; | |||
} | |||
void FullFramePixelBuffer::setSize(int w, int h) | |||
void FullFramePixelBuffer::setSize(int /*w*/, int /*h*/) | |||
{ | |||
// setBuffer() should be used | |||
throw rfb::Exception("Invalid call to FullFramePixelBuffer::setSize()"); |
@@ -86,7 +86,7 @@ namespace rfb { | |||
// Ensure that the specified rectangle of buffer is up to date. | |||
// Overridden by derived classes implementing framebuffer access | |||
// to copy the required display data into place. | |||
virtual void grabRegion(const Region& __unused_attr region) {} | |||
virtual void grabRegion(const Region& /*region*/) {} | |||
protected: | |||
PixelBuffer(); |
@@ -48,7 +48,7 @@ RREDecoder::~RREDecoder() | |||
{ | |||
} | |||
bool RREDecoder::readRect(const Rect& r, rdr::InStream* is, | |||
bool RREDecoder::readRect(const Rect& /*r*/, rdr::InStream* is, | |||
const ServerParams& server, rdr::OutStream* os) | |||
{ | |||
rdr::U32 numRects; |
@@ -107,7 +107,7 @@ void RREEncoder::writeRect(const PixelBuffer* pb, const Palette& palette) | |||
mos.clear(); | |||
} | |||
void RREEncoder::writeSolidRect(int width, int height, | |||
void RREEncoder::writeSolidRect(int /*width*/, int /*height*/, | |||
const PixelFormat& pf, | |||
const rdr::U8* colour) | |||
{ |
@@ -44,7 +44,8 @@ bool RawEncoder::isSupported() | |||
return true; | |||
} | |||
void RawEncoder::writeRect(const PixelBuffer* pb, const Palette& palette) | |||
void RawEncoder::writeRect(const PixelBuffer* pb, | |||
const Palette& /*palette*/) | |||
{ | |||
const rdr::U8* buffer; | |||
int stride; |
@@ -286,7 +286,7 @@ bool SConnection::processInitMsg() | |||
return reader_->readClientInit(); | |||
} | |||
bool SConnection::handleAuthFailureTimeout(Timer* t) | |||
bool SConnection::handleAuthFailureTimeout(Timer* /*t*/) | |||
{ | |||
if (state_ != RFBSTATE_SECURITY_FAILURE) { | |||
close("SConnection::handleAuthFailureTimeout: invalid state"); | |||
@@ -452,7 +452,7 @@ void SConnection::authSuccess() | |||
{ | |||
} | |||
void SConnection::queryConnection(const char* userName) | |||
void SConnection::queryConnection(const char* /*userName*/) | |||
{ | |||
approveConnection(true); | |||
} | |||
@@ -491,14 +491,14 @@ void SConnection::approveConnection(bool accept, const char* reason) | |||
} | |||
} | |||
void SConnection::clientInit(bool shared) | |||
void SConnection::clientInit(bool /*shared*/) | |||
{ | |||
writer_->writeServerInit(client.width(), client.height(), | |||
client.pf(), client.name()); | |||
state_ = RFBSTATE_NORMAL; | |||
} | |||
void SConnection::close(const char* reason) | |||
void SConnection::close(const char* /*reason*/) | |||
{ | |||
state_ = RFBSTATE_CLOSING; | |||
cleanup(); | |||
@@ -512,7 +512,8 @@ void SConnection::setPixelFormat(const PixelFormat& pf) | |||
writeFakeColourMap(); | |||
} | |||
void SConnection::framebufferUpdateRequest(const Rect& r, bool incremental) | |||
void SConnection::framebufferUpdateRequest(const Rect& /*r*/, | |||
bool /*incremental*/) | |||
{ | |||
if (!readyForSetColourMapEntries) { | |||
readyForSetColourMapEntries = true; | |||
@@ -533,8 +534,9 @@ void SConnection::fence(rdr::U32 flags, unsigned len, const char data[]) | |||
writer()->writeFence(flags, len, data); | |||
} | |||
void SConnection::enableContinuousUpdates(bool enable, | |||
int x, int y, int w, int h) | |||
void SConnection::enableContinuousUpdates(bool /*enable*/, | |||
int /*x*/, int /*y*/, | |||
int /*w*/, int /*h*/) | |||
{ | |||
} | |||
@@ -542,11 +544,11 @@ void SConnection::handleClipboardRequest() | |||
{ | |||
} | |||
void SConnection::handleClipboardAnnounce(bool available) | |||
void SConnection::handleClipboardAnnounce(bool /*available*/) | |||
{ | |||
} | |||
void SConnection::handleClipboardData(const char* data) | |||
void SConnection::handleClipboardData(const char* /*data*/) | |||
{ | |||
} | |||
@@ -84,9 +84,9 @@ namespace rfb { | |||
// setScreenLayout() requests to reconfigure the framebuffer and/or | |||
// the layout of screens. | |||
virtual unsigned int setScreenLayout(int __unused_attr fb_width, | |||
int __unused_attr fb_height, | |||
const ScreenSet& __unused_attr layout) { | |||
virtual unsigned int setScreenLayout(int /*fb_width*/, | |||
int /*fb_height*/, | |||
const ScreenSet& /*layout*/) { | |||
return resultProhibited; | |||
} | |||
@@ -104,14 +104,14 @@ namespace rfb { | |||
// handleClipboardAnnounce() is called to indicate a change in the | |||
// clipboard on a client. Call VNCServer::requestClipboard() to | |||
// access the actual data. | |||
virtual void handleClipboardAnnounce(bool __unused_attr available) {} | |||
virtual void handleClipboardAnnounce(bool /*available*/) {} | |||
// handleClipboardData() is called when a client has sent over | |||
// the clipboard data as a result of a previous call to | |||
// VNCServer::requestClipboard(). Note that this function might | |||
// never be called if the clipboard data was no longer available | |||
// when the client received the request. | |||
virtual void handleClipboardData(const char* __unused_attr data) {} | |||
virtual void handleClipboardData(const char* /*data*/) {} | |||
protected: | |||
virtual ~SDesktop() {} | |||
@@ -149,7 +149,7 @@ namespace rfb { | |||
server = 0; | |||
} | |||
virtual void queryConnection(network::Socket* sock, | |||
const char* userName) { | |||
const char* /*userName*/) { | |||
server->approveConnection(sock, true, NULL); | |||
} | |||
@@ -40,7 +40,7 @@ SMsgHandler::~SMsgHandler() | |||
{ | |||
} | |||
void SMsgHandler::clientInit(bool shared) | |||
void SMsgHandler::clientInit(bool /*shared*/) | |||
{ | |||
} | |||
@@ -118,7 +118,7 @@ void SMsgHandler::handleClipboardCaps(rdr::U32 flags, const rdr::U32* lengths) | |||
client.setClipboardCaps(flags, lengths); | |||
} | |||
void SMsgHandler::handleClipboardRequest(rdr::U32 flags) | |||
void SMsgHandler::handleClipboardRequest(rdr::U32 /*flags*/) | |||
{ | |||
} | |||
@@ -126,13 +126,13 @@ void SMsgHandler::handleClipboardPeek() | |||
{ | |||
} | |||
void SMsgHandler::handleClipboardNotify(rdr::U32 flags) | |||
void SMsgHandler::handleClipboardNotify(rdr::U32 /*flags*/) | |||
{ | |||
} | |||
void SMsgHandler::handleClipboardProvide(rdr::U32 flags, | |||
const size_t* lengths, | |||
const rdr::U8* const* data) | |||
void SMsgHandler::handleClipboardProvide(rdr::U32 /*flags*/, | |||
const size_t* /*lengths*/, | |||
const rdr::U8* const* /*data*/) | |||
{ | |||
} | |||
@@ -199,13 +199,13 @@ bool TightDecoder::readRect(const Rect& r, rdr::InStream* is, | |||
return true; | |||
} | |||
bool TightDecoder::doRectsConflict(const Rect& rectA, | |||
bool TightDecoder::doRectsConflict(const Rect& /*rectA*/, | |||
const void* bufferA, | |||
size_t buflenA, | |||
const Rect& rectB, | |||
const Rect& /*rectB*/, | |||
const void* bufferB, | |||
size_t buflenB, | |||
const ServerParams& server) | |||
const ServerParams& /*server*/) | |||
{ | |||
rdr::U8 comp_ctl_a, comp_ctl_b; | |||
@@ -102,7 +102,7 @@ void TightEncoder::writeRect(const PixelBuffer* pb, const Palette& palette) | |||
} | |||
} | |||
void TightEncoder::writeSolidRect(int width, int height, | |||
void TightEncoder::writeSolidRect(int /*width*/, int /*height*/, | |||
const PixelFormat& pf, | |||
const rdr::U8* colour) | |||
{ |
@@ -112,7 +112,8 @@ int TightJPEGEncoder::getQualityLevel() | |||
return qualityLevel; | |||
} | |||
void TightJPEGEncoder::writeRect(const PixelBuffer* pb, const Palette& palette) | |||
void TightJPEGEncoder::writeRect(const PixelBuffer* pb, | |||
const Palette& /*palette*/) | |||
{ | |||
const rdr::U8* buffer; | |||
int stride; |
@@ -37,7 +37,7 @@ AliasParameter pam_service("pam_service", "Alias for PAMService", | |||
int do_pam_auth(const char *service, const char *username, | |||
const char *password); | |||
bool UnixPasswordValidator::validateInternal(SConnection * sc, | |||
bool UnixPasswordValidator::validateInternal(SConnection * /*sc*/, | |||
const char *username, | |||
const char *password) | |||
{ |
@@ -29,7 +29,7 @@ | |||
using namespace rfb; | |||
// This method will only work for Windows NT, 2000, and XP (and possibly Vista) | |||
bool WinPasswdValidator::validateInternal(rfb::SConnection* sc, | |||
bool WinPasswdValidator::validateInternal(rfb::SConnection* /*sc*/, | |||
const char* username, | |||
const char* password) | |||
{ |
@@ -80,8 +80,9 @@ ZRLEDecoder::~ZRLEDecoder() | |||
{ | |||
} | |||
bool ZRLEDecoder::readRect(const Rect& r, rdr::InStream* is, | |||
const ServerParams& server, rdr::OutStream* os) | |||
bool ZRLEDecoder::readRect(const Rect& /*r*/, rdr::InStream* is, | |||
const ServerParams& /*server*/, | |||
rdr::OutStream* os) | |||
{ | |||
rdr::U32 len; | |||
@@ -35,10 +35,6 @@ struct timeval; | |||
# define __printf_attr(a, b) | |||
#endif // __GNUC__ | |||
#ifndef __unused_attr | |||
# define __unused_attr __attribute((__unused__)) | |||
#endif | |||
namespace rfb { | |||
// -=- Class to handle cleanup of arrays of characters |
@@ -41,7 +41,8 @@ struct TestEntry { | |||
testfn fn; | |||
}; | |||
static void testMemcpy(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf, | |||
static void testMemcpy(rfb::PixelFormat &dstpf, | |||
rfb::PixelFormat& /*srcpf*/, | |||
rdr::U8 *dst, rdr::U8 *src) | |||
{ | |||
int h; | |||
@@ -53,19 +54,22 @@ static void testMemcpy(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf, | |||
} | |||
} | |||
static void testBuffer(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf, | |||
static void testBuffer(rfb::PixelFormat &dstpf, | |||
rfb::PixelFormat &srcpf, | |||
rdr::U8 *dst, rdr::U8 *src) | |||
{ | |||
dstpf.bufferFromBuffer(dst, srcpf, src, tile, tile, fbsize, fbsize); | |||
} | |||
static void testToRGB(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf, | |||
static void testToRGB(rfb::PixelFormat& /*dstpf*/, | |||
rfb::PixelFormat &srcpf, | |||
rdr::U8 *dst, rdr::U8 *src) | |||
{ | |||
srcpf.rgbFromBuffer(dst, src, tile, fbsize, tile); | |||
} | |||
static void testFromRGB(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf, | |||
static void testFromRGB(rfb::PixelFormat &dstpf, | |||
rfb::PixelFormat& /*srcpf*/, | |||
rdr::U8 *dst, rdr::U8 *src) | |||
{ | |||
dstpf.bufferFromRGB(dst, src, tile, fbsize, tile); | |||
@@ -120,7 +124,7 @@ static void doTests(rfb::PixelFormat &dstpf, rfb::PixelFormat &srcpf) | |||
printf("\n"); | |||
} | |||
int main(int argc, char **argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
size_t bufsize; | |||
@@ -139,7 +139,7 @@ void CConn::initDone() | |||
server.height())); | |||
} | |||
void CConn::setPixelFormat(const rfb::PixelFormat& pf) | |||
void CConn::setPixelFormat(const rfb::PixelFormat& /*pf*/) | |||
{ | |||
// Override format | |||
CConnection::setPixelFormat(filePF); |
@@ -329,12 +329,11 @@ void SConn::getStats(double& ratio, unsigned long long& bytes, | |||
manager->getStats(ratio, bytes, rawEquivalent); | |||
} | |||
void SConn::setAccessRights(AccessRights ar) | |||
void SConn::setAccessRights(AccessRights) | |||
{ | |||
} | |||
void SConn::setDesktopSize(int fb_width, int fb_height, | |||
const rfb::ScreenSet& layout) | |||
void SConn::setDesktopSize(int, int, const rfb::ScreenSet&) | |||
{ | |||
} | |||
@@ -378,7 +378,7 @@ static void dotest(TestWindow* win) | |||
1.0 / (delay + rate * 1920 * 1080)); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
TestWindow* win; | |||
@@ -291,7 +291,7 @@ static void doTests(const rfb::PixelFormat &dstpf, | |||
} | |||
} | |||
int main(int argc, char **argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
rfb::PixelFormat dstpf, srcpf; | |||
@@ -84,7 +84,7 @@ static void testCRLF(const char* input, const char* expected) | |||
rfb::strFree(output); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
testLF("", ""); | |||
testLF("no EOL", "no EOL"); |
@@ -461,7 +461,7 @@ void testDragAndRelease() | |||
printf("OK\n"); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
testDisabledOption(); | |||
@@ -1233,7 +1233,7 @@ void testIgnore() | |||
testIgnoreAfterGesture(); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
testOneTap(); | |||
testTwoTap(); |
@@ -46,7 +46,7 @@ static void doTest(const char* hostAndPort, | |||
rfb::strFree(host); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
doTest(":5", "localhost", 5905); | |||
@@ -183,7 +183,7 @@ void is888Tests() | |||
printf("\n"); | |||
} | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
sanityTests(); | |||
is888Tests(); |
@@ -85,7 +85,7 @@ struct _utf8utf16 utf8utf16[] = { | |||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a)) | |||
int main(int argc, char** argv) | |||
int main(int /*argc*/, char** /*argv*/) | |||
{ | |||
int failures; | |||
size_t i; |
@@ -91,7 +91,7 @@ private: | |||
XDrawString(dpy, win(), gc, startx, starty, text.buf, strlen(text.buf)); | |||
} | |||
virtual void handleEvent(TXWindow* w, XEvent* ev) { | |||
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) { | |||
switch (ev->type) { | |||
case Expose: | |||
paint(); |
@@ -109,7 +109,7 @@ private: | |||
text, strlen(text)); | |||
} | |||
virtual void handleEvent(TXWindow* w, XEvent* ev) { | |||
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) { | |||
switch (ev->type) { | |||
case Expose: | |||
paint(); |
@@ -82,7 +82,7 @@ public: | |||
} | |||
protected: | |||
virtual void deleteWindow(TXWindow* w) { | |||
virtual void deleteWindow(TXWindow* /*w*/) { | |||
ok = false; | |||
done = true; | |||
unmap(); |
@@ -108,7 +108,7 @@ private: | |||
} while (text.buf[i] != 0); | |||
} | |||
virtual void handleEvent(TXWindow* w, XEvent* ev) { | |||
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) { | |||
switch (ev->type) { | |||
case Expose: | |||
paint(); |
@@ -142,19 +142,21 @@ public: | |||
// takeFocus() is called when the window has received keyboard focus from the | |||
// window manager. | |||
virtual void takeFocus(Time time) {} | |||
virtual void takeFocus(Time /*time*/) {} | |||
// selectionNotify() is called when the selection owner has replied to a | |||
// request for information about a selection from the selection owner. | |||
virtual void selectionNotify(XSelectionEvent* ev, Atom type, int format, | |||
int nitems, void* data) {} | |||
virtual void selectionNotify(XSelectionEvent* /*ev*/, Atom /*type*/, | |||
int /*format*/, int /*nitems*/, | |||
void* /*data*/) {} | |||
// selectionRequest() is called when this window is the selection owner and | |||
// another X client has requested the selection. It should set the given | |||
// property on the given window to the value of the given selection, | |||
// returning true if successful, false otherwise. | |||
virtual bool selectionRequest(Window requestor, | |||
Atom selection, Atom property) { return false;} | |||
virtual bool selectionRequest(Window /*requestor*/, | |||
Atom /*selection*/, | |||
Atom /*property*/) { return false;} | |||
// Static methods | |||
@@ -74,7 +74,7 @@ void QueryConnectDialog::buttonActivate(TXButton* b) { | |||
callback->queryRejected(); | |||
} | |||
bool QueryConnectDialog::handleTimeout(rfb::Timer* t) { | |||
bool QueryConnectDialog::handleTimeout(rfb::Timer* /*t*/) { | |||
if (timeUntilReject-- == 0) { | |||
unmap(); | |||
callback->queryTimedOut(); |
@@ -110,7 +110,7 @@ public: | |||
// handleEvent() | |||
virtual void handleEvent(TXWindow* w, XEvent* ev) { | |||
virtual void handleEvent(TXWindow* /*w*/, XEvent* ev) { | |||
if (ev->type == vncExtEventBase + VncExtQueryConnectNotify) { | |||
vlog.debug("query connection event"); | |||
if (queryConnectDialog) | |||
@@ -134,7 +134,7 @@ public: | |||
} | |||
// TXDeleteWindowCallback method | |||
virtual void deleteWindow(TXWindow* w) { | |||
virtual void deleteWindow(TXWindow* /*w*/) { | |||
exit(1); | |||
} | |||
@@ -142,6 +142,7 @@ finish_daemon(void) | |||
static void | |||
sighandler(int sig) | |||
{ | |||
(void)sig; | |||
if (script > 0) { | |||
kill(script, SIGTERM); | |||
} | |||
@@ -169,6 +170,10 @@ conv(int num_msg, | |||
const struct pam_message **msg, | |||
struct pam_response **resp, void *appdata_ptr) | |||
{ | |||
(void)num_msg; | |||
(void)msg; | |||
(void)resp; | |||
(void)appdata_ptr; | |||
/* Opening a session should not require a conversation */ | |||
return PAM_CONV_ERR; | |||
} |
@@ -208,7 +208,8 @@ void Image::updateRect(Image *src, int dst_x, int dst_y, | |||
static bool caughtShmError = false; | |||
static int ShmCreationXErrorHandler(Display *dpy, XErrorEvent *error) | |||
static int ShmCreationXErrorHandler(Display* /*dpy*/, | |||
XErrorEvent* /*error*/) | |||
{ | |||
caughtShmError = true; | |||
return 0; |
@@ -505,11 +505,13 @@ int vncRandRReconfigureOutput(int outputIdx, int x, int y, | |||
int vncRandRCanCreateOutputs(int extraOutputs) | |||
{ | |||
(void)extraOutputs; | |||
return 0; | |||
} | |||
int vncRandRCreateOutputs(int extraOutputs) | |||
{ | |||
(void)extraOutputs; | |||
return 0; | |||
} | |||
@@ -545,7 +545,7 @@ void XDesktop::keyEvent(rdr::U32 keysym, rdr::U32 xtcode, bool down) { | |||
#endif | |||
} | |||
void XDesktop::clientCutText(const char* str) { | |||
void XDesktop::clientCutText(const char* /*str*/) { | |||
} | |||
ScreenSet XDesktop::computeScreenLayout() |
@@ -108,7 +108,7 @@ static const char* defaultDesktopName() | |||
static bool caughtSignal = false; | |||
static void CleanupSignalHandler(int sig) | |||
static void CleanupSignalHandler(int /*sig*/) | |||
{ | |||
caughtSignal = true; | |||
} |
@@ -399,7 +399,8 @@ void CConn::framebufferUpdateEnd() | |||
// The rest of the callbacks are fairly self-explanatory... | |||
void CConn::setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs) | |||
void CConn::setColourMapEntries(int /*firstColour*/, int /*nColours*/, | |||
rdr::U16* /*rgbs*/) | |||
{ | |||
vlog.error(_("Invalid SetColourMapEntries from server!")); | |||
} |
@@ -1031,7 +1031,8 @@ void DesktopWindow::fullscreen_on() | |||
} | |||
#if !defined(WIN32) && !defined(__APPLE__) | |||
Bool eventIsFocusWithSerial(Display *display, XEvent *event, XPointer arg) | |||
Bool eventIsFocusWithSerial(Display* /*display*/, XEvent *event, | |||
XPointer arg) | |||
{ | |||
unsigned long serial; | |||
@@ -1270,7 +1271,7 @@ void DesktopWindow::handleResizeTimeout(void *data) | |||
} | |||
void DesktopWindow::reconfigureFullscreen(void *data) | |||
void DesktopWindow::reconfigureFullscreen(void* /*data*/) | |||
{ | |||
std::set<DesktopWindow *>::iterator iter; | |||
@@ -1495,7 +1496,7 @@ void DesktopWindow::repositionWidgets() | |||
vscroll->value(vscroll->clamp(vscroll->value())); | |||
} | |||
void DesktopWindow::handleClose(Fl_Widget *wnd, void *data) | |||
void DesktopWindow::handleClose(Fl_Widget* /*wnd*/, void* /*data*/) | |||
{ | |||
disconnect(); | |||
} | |||
@@ -1552,7 +1553,7 @@ void DesktopWindow::scrollTo(int x, int y) | |||
damage(FL_DAMAGE_SCROLL); | |||
} | |||
void DesktopWindow::handleScroll(Fl_Widget *widget, void *data) | |||
void DesktopWindow::handleScroll(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
DesktopWindow *self = (DesktopWindow *)data; | |||
@@ -1050,7 +1050,7 @@ void OptionsDialog::createMiscPage(int tx, int ty, int tw, int th) | |||
} | |||
void OptionsDialog::handleAutoselect(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleAutoselect(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1067,7 +1067,7 @@ void OptionsDialog::handleAutoselect(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleCompression(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleCompression(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1078,7 +1078,7 @@ void OptionsDialog::handleCompression(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleJpeg(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleJpeg(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1090,7 +1090,7 @@ void OptionsDialog::handleJpeg(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleX509(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleX509(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1104,7 +1104,7 @@ void OptionsDialog::handleX509(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleRSAAES(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleRSAAES(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1115,8 +1115,9 @@ void OptionsDialog::handleRSAAES(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleClipboard(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleClipboard(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
(void)data; | |||
#if !defined(WIN32) && !defined(__APPLE__) | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1131,7 +1132,7 @@ void OptionsDialog::handleClipboard(Fl_Widget *widget, void *data) | |||
#endif | |||
} | |||
void OptionsDialog::handleFullScreenMode(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleFullScreenMode(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1142,7 +1143,7 @@ void OptionsDialog::handleFullScreenMode(Fl_Widget *widget, void *data) | |||
} | |||
} | |||
void OptionsDialog::handleCancel(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleCancel(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -1150,7 +1151,7 @@ void OptionsDialog::handleCancel(Fl_Widget *widget, void *data) | |||
} | |||
void OptionsDialog::handleOK(Fl_Widget *widget, void *data) | |||
void OptionsDialog::handleOK(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
OptionsDialog *dialog = (OptionsDialog*)data; | |||
@@ -135,7 +135,8 @@ rfb::Rect PlatformPixelBuffer::getDamage(void) | |||
static bool caughtError; | |||
static int XShmAttachErrorHandler(Display *dpy, XErrorEvent *error) | |||
static int XShmAttachErrorHandler(Display* /*dpy*/, | |||
XErrorEvent* /*error*/) | |||
{ | |||
caughtError = true; | |||
return 0; |
@@ -157,13 +157,13 @@ void ServerDialog::run(const char* servername, char *newservername) | |||
newservername[VNCSERVERNAMELEN - 1] = '\0'; | |||
} | |||
void ServerDialog::handleOptions(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleOptions(Fl_Widget* /*widget*/, void* /*data*/) | |||
{ | |||
OptionsDialog::showDialog(); | |||
} | |||
void ServerDialog::handleLoad(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleLoad(Fl_Widget* /*widget*/, void* data) | |||
{ | |||
ServerDialog *dialog = (ServerDialog*)data; | |||
@@ -201,7 +201,7 @@ void ServerDialog::handleLoad(Fl_Widget *widget, void *data) | |||
} | |||
void ServerDialog::handleSaveAs(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleSaveAs(Fl_Widget* /*widget*/, void* data) | |||
{ | |||
ServerDialog *dialog = (ServerDialog*)data; | |||
const char* servername = dialog->serverName->value(); | |||
@@ -261,13 +261,13 @@ void ServerDialog::handleSaveAs(Fl_Widget *widget, void *data) | |||
} | |||
void ServerDialog::handleAbout(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleAbout(Fl_Widget* /*widget*/, void* /*data*/) | |||
{ | |||
about_vncviewer(); | |||
} | |||
void ServerDialog::handleCancel(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleCancel(Fl_Widget* /*widget*/, void* data) | |||
{ | |||
ServerDialog *dialog = (ServerDialog*)data; | |||
@@ -276,7 +276,7 @@ void ServerDialog::handleCancel(Fl_Widget *widget, void *data) | |||
} | |||
void ServerDialog::handleConnect(Fl_Widget *widget, void *data) | |||
void ServerDialog::handleConnect(Fl_Widget* /*widget*/, void *data) | |||
{ | |||
ServerDialog *dialog = (ServerDialog*)data; | |||
const char* servername = dialog->serverName->value(); |
@@ -93,7 +93,9 @@ void Surface::draw(Surface* dst, int src_x, int src_y, int x, int y, int w, int | |||
DeleteDC(dstdc); | |||
} | |||
void Surface::blend(int src_x, int src_y, int x, int y, int w, int h, int a) | |||
void Surface::blend(int /*src_x*/, int /*src_y*/, | |||
int /*x*/, int /*y*/, int /*w*/, int /*h*/, | |||
int /*a*/) | |||
{ | |||
// Compositing doesn't work properly for window DC:s | |||
assert(false); |
@@ -114,7 +114,7 @@ enum { ID_DISCONNECT, ID_FULLSCREEN, ID_MINIMIZE, ID_RESIZE, | |||
static const WORD SCAN_FAKE = 0xaa; | |||
#endif | |||
Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_) | |||
Viewport::Viewport(int w, int h, const rfb::PixelFormat& /*serverPF*/, CConn* cc_) | |||
: Fl_Widget(0, 0, w, h), cc(cc_), frameBuffer(NULL), | |||
lastPointerPos(0, 0), lastButtonMask(0), | |||
#ifdef WIN32 |
@@ -59,7 +59,8 @@ Win32TouchHandler::Win32TouchHandler(HWND hWnd) : | |||
supportedTouches); | |||
} | |||
bool Win32TouchHandler::processEvent(UINT Msg, WPARAM wParam, LPARAM lParam) | |||
bool Win32TouchHandler::processEvent(UINT Msg, WPARAM /*wParam*/, | |||
LPARAM lParam) | |||
{ | |||
GESTUREINFO gi; | |||
@@ -386,7 +387,7 @@ void Win32TouchHandler::fakeButtonEvent(bool press, int button, | |||
} | |||
void Win32TouchHandler::fakeKeyEvent(bool press, int keysym, | |||
const GestureEvent origEvent) | |||
const GestureEvent /*origEvent*/) | |||
{ | |||
UINT Msg = press ? WM_KEYDOWN : WM_KEYUP; | |||
WPARAM wParam; |
@@ -362,7 +362,8 @@ std::string Fl_Monitor_Arrangement::description(int m) | |||
#if defined(WIN32) | |||
static BOOL CALLBACK EnumDisplayMonitorsCallback( | |||
HMONITOR monitor, HDC deviceContext, LPRECT rect, LPARAM userData) | |||
HMONITOR monitor, HDC /*deviceContext*/, LPRECT /*rect*/, | |||
LPARAM userData) | |||
{ | |||
std::set<HMONITOR>* sys_monitors = (std::set<HMONITOR>*)userData; | |||
sys_monitors->insert(monitor); | |||
@@ -549,7 +550,8 @@ int Fl_Monitor_Arrangement::fltk_event_handler(int event) | |||
return 0; | |||
} | |||
void Fl_Monitor_Arrangement::monitor_pressed(Fl_Widget *widget, void *user_data) | |||
void Fl_Monitor_Arrangement::monitor_pressed(Fl_Widget* /*widget*/, | |||
void *user_data) | |||
{ | |||
Fl_Monitor_Arrangement *self = (Fl_Monitor_Arrangement *) user_data; | |||
@@ -61,8 +61,9 @@ static HandlerMap handlers; | |||
#if defined(WIN32) | |||
LRESULT CALLBACK win32WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, | |||
LPARAM lParam, UINT_PTR uIdSubclass, | |||
DWORD_PTR dwRefData) | |||
LPARAM lParam, | |||
UINT_PTR /*uIdSubclass*/, | |||
DWORD_PTR /*dwRefData*/) | |||
{ | |||
bool handled = false; | |||
@@ -168,7 +169,7 @@ void x11_ungrab_pointer(Window window) | |||
} | |||
#endif | |||
static int handleTouchEvent(void *event, void *data) | |||
static int handleTouchEvent(void *event, void* /*data*/) | |||
{ | |||
#if defined(WIN32) | |||
MSG *msg = (MSG*)event; | |||
@@ -189,7 +190,10 @@ static int handleTouchEvent(void *event, void *data) | |||
(int)GetLastError()); | |||
} | |||
} | |||
#elif !defined(__APPLE__) | |||
#elif defined(__APPLE__) | |||
// No touch support on macOS | |||
(void)event; | |||
#else | |||
XEvent *xevent = (XEvent*)event; | |||
if (xevent->type == MapNotify) { |
@@ -232,12 +232,12 @@ static void mainloop(const char* vncserver, network::Socket* sock) | |||
} | |||
#ifdef __APPLE__ | |||
static void about_callback(Fl_Widget *widget, void *data) | |||
static void about_callback(Fl_Widget* /*widget*/, void* /*data*/) | |||
{ | |||
about_vncviewer(); | |||
} | |||
static void new_connection_cb(Fl_Widget *widget, void *data) | |||
static void new_connection_cb(Fl_Widget* /*widget*/, void* /*data*/) | |||
{ | |||
const char *argv[2]; | |||
pid_t pid; |
@@ -229,7 +229,7 @@ struct DLGTEMPLATEEX { | |||
short cy; | |||
}; | |||
static int CALLBACK removeCtxtHelp(HWND hwnd, UINT message, LPARAM lParam) { | |||
static int CALLBACK removeCtxtHelp(HWND /*hwnd*/, UINT message, LPARAM lParam) { | |||
if (message == PSCB_PRECREATE) { | |||
// Remove the context-help style, to remove the titlebar ? button | |||
// *** Nasty hack to cope with new & old dialog template formats... | |||
@@ -280,6 +280,7 @@ bool PropSheet::showPropSheet(HWND owner, bool showApply, bool showCtxtHelp, boo | |||
centerWindow(handle, owner); | |||
plog.info("created %p", handle); | |||
(void)capture; | |||
#ifdef _DIALOG_CAPTURE | |||
if (capture) { | |||
plog.info("capturing \"%s\"", (const char*)CStr(title.buf)); |
@@ -60,13 +60,13 @@ namespace rfb { | |||
// onCommand() is called upon receipt of a WM_COMMAND message item other than IDOK | |||
// or IDCANCEL. It should return true if the command has been handled. | |||
virtual bool onCommand(int item, int cmd) { return false; } | |||
virtual bool onCommand(int /*item*/, int /*cmd*/) { return false; } | |||
// onHelp() is called upon receipt of a WM_MENU message. This indicates that | |||
// context-specific help should be displayed, for a dialog control, for example. | |||
// It should return true if the command has been handled. | |||
virtual bool onHelp(int item) { return false; } | |||
virtual bool onHelp(int /*item*/) { return false; } | |||
// onOk() is called when the OK button is pressed. The hwnd argument is the | |||
// dialog box's window handle. |
@@ -79,8 +79,8 @@ struct monitorByNameData { | |||
}; | |||
static BOOL CALLBACK monitorByNameEnumProc(HMONITOR monitor, | |||
HDC dc, | |||
LPRECT pos, | |||
HDC /*dc*/, | |||
LPRECT /*pos*/, | |||
LPARAM d) { | |||
monitorByNameData* data = (monitorByNameData*)d; | |||
memset(data->info, 0, sizeof(MONITORINFOEXA)); |
@@ -73,7 +73,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) { | |||
} | |||
} | |||
void RegConfig::processEvent(HANDLE event_) { | |||
void RegConfig::processEvent(HANDLE /*event*/) { | |||
vlog.info("registry changed"); | |||
// Reinstate the registry change notifications |
@@ -106,7 +106,7 @@ SecurityPage::initDialog() | |||
} | |||
bool | |||
SecurityPage::onCommand(int id, int cmd) | |||
SecurityPage::onCommand(int id, int /*cmd*/) | |||
{ | |||
if (id == IDC_ENC_X509) { | |||
if (isItemChecked(IDC_ENC_X509)) |
@@ -149,7 +149,7 @@ namespace rfb { | |||
setItemChecked(enc_idc, enable); | |||
setItemChecked(auth_idc, enable); | |||
} | |||
inline bool showFileChooser(const RegKey& rk, | |||
inline bool showFileChooser(const RegKey& /*rk*/, | |||
const char* title, | |||
const char* filter, | |||
HWND hwnd) |
@@ -40,7 +40,7 @@ namespace rfb { | |||
setItemChecked(IDC_REMOVE_WALLPAPER, rfb::win32::SDisplay::removeWallpaper); | |||
setItemChecked(IDC_DISABLE_EFFECTS, rfb::win32::SDisplay::disableEffects); | |||
} | |||
bool onCommand(int id, int cmd) { | |||
bool onCommand(int id, int /*cmd*/) { | |||
switch (id) { | |||
case IDC_DISCONNECT_LOGOFF: | |||
case IDC_DISCONNECT_LOCK: |
@@ -39,7 +39,7 @@ namespace rfb { | |||
setItemChecked(IDC_CAPTUREBLT, rfb::win32::DeviceFrameBuffer::useCaptureBlt); | |||
onCommand(IDC_USEHOOKS, 0); | |||
} | |||
bool onCommand(int id, int cmd) { | |||
bool onCommand(int id, int /*cmd*/) { | |||
switch (id) { | |||
case IDC_USEPOLLING: | |||
case IDC_USEHOOKS: |
@@ -49,7 +49,7 @@ namespace rfb { | |||
enableAffectSSaver = false; | |||
enableItem(IDC_AFFECT_SCREENSAVER, enableAffectSSaver); | |||
} | |||
bool onCommand(int id, int cmd) { | |||
bool onCommand(int /*id*/, int /*cmd*/) { | |||
BOOL inputResetsBlocked; | |||
SystemParametersInfo(SPI_GETBLOCKSENDINPUTRESETS, 0, &inputResetsBlocked, 0); | |||
setChanged((rfb::Server::acceptKeyEvents != isItemChecked(IDC_ACCEPT_KEYS)) || |
@@ -39,7 +39,7 @@ namespace rfb { | |||
void initDialog() { | |||
setItemChecked(IDC_PROTOCOL_3_3, rfb::Server::protocol3_3); | |||
} | |||
bool onCommand(int id, int cmd) { | |||
bool onCommand(int id, int /*cmd*/) { | |||
switch (id) { | |||
case IDC_LEGACY_IMPORT: | |||
{ |
@@ -36,7 +36,7 @@ namespace rfb { | |||
setItemChecked(IDC_SHARE_ALWAYS, rfb::Server::alwaysShared); | |||
setItemChecked(IDC_SHARE_CLIENT, !(rfb::Server::neverShared || rfb::Server::alwaysShared)); | |||
} | |||
bool onCommand(int id, int cmd) { | |||
bool onCommand(int /*id*/, int /*cmd*/) { | |||
setChanged((isItemChecked(IDC_DISCONNECT_CLIENTS) != rfb::Server::disconnectClients) || | |||
(isItemChecked(IDC_SHARE_NEVER) != rfb::Server::neverShared) || | |||
(isItemChecked(IDC_SHARE_ALWAYS) != rfb::Server::alwaysShared)); |
@@ -76,7 +76,7 @@ processParams(int argc, char* argv[]) { | |||
} | |||
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, char* cmdLine, int cmdShow) { | |||
int WINAPI WinMain(HINSTANCE inst, HINSTANCE /*prev*/, char* /*cmdLine*/, int /*cmdShow*/) { | |||
// Configure debugging output | |||
#ifdef _DEBUG |
@@ -102,7 +102,7 @@ void ControlPanel::UpdateListView(ListConnInfo* LCInfo) | |||
} | |||
} | |||
BOOL ControlPanel::dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
BOOL ControlPanel::dialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM /*lParam*/) | |||
{ | |||
switch (msg) { | |||
case WM_INITDIALOG: |
@@ -101,7 +101,7 @@ BOOL GetSessionUserTokenWin(OUT LPHANDLE lphUserToken) | |||
////////////////////////////////////////////////////////////////////////////// | |||
// START the app as system | |||
HANDLE LaunchProcessWin(DWORD dwSessionId) | |||
HANDLE LaunchProcessWin(DWORD /*dwSessionId*/) | |||
{ | |||
HANDLE hProcess = NULL; | |||
HANDLE hToken = NULL; | |||
@@ -125,7 +125,7 @@ HANDLE LaunchProcessWin(DWORD dwSessionId) | |||
return hProcess; | |||
} | |||
DWORD VNCServerService::serviceMain(int argc, TCHAR* argv[]) | |||
DWORD VNCServerService::serviceMain(int /*argc*/, TCHAR* /*argv*/ []) | |||
{ | |||
ConsoleSessionId OlddwSessionId; | |||
@@ -238,7 +238,7 @@ static void processParams(int argc, char** argv) { | |||
// -=- main | |||
// | |||
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prevInst, char* cmdLine, int cmdShow) { | |||
int WINAPI WinMain(HINSTANCE /*inst*/, HINSTANCE /*prevInst*/, char* /*cmdLine*/, int /*cmdShow*/) { | |||
int result = 0; | |||
try { |
@@ -73,7 +73,7 @@ ATOM ATOM_Popup_Selection = GlobalAddAtom(_T("RFB.WM_Hooks.PopupSelectionAtom")) | |||
HINSTANCE dll_instance = 0; | |||
BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID reserved) { | |||
BOOL WINAPI DllMain(HANDLE instance, ULONG reason, LPVOID /*reserved*/) { | |||
switch (reason) { | |||
case DLL_PROCESS_ATTACH: | |||
dll_instance = (HINSTANCE)instance; | |||
@@ -144,7 +144,7 @@ bool NotifyCursor(HCURSOR cursor) { | |||
return NotifyHookOwner(WM_HK_CursorChanged, 0, (LPARAM)cursor); | |||
} | |||
void ProcessWindowMessage(UINT msg, HWND wnd, WPARAM wParam, LPARAM lParam) { | |||
void ProcessWindowMessage(UINT msg, HWND wnd, WPARAM wParam, LPARAM /*lParam*/) { | |||
#ifdef _DEBUG | |||
if ((msg >= diagnostic_min) && (msg <= diagnostic_max)) | |||
PostThreadMessage(hook_owner, WM_HK_Diagnostic, msg, (LPARAM)wnd); |