From 1f5d4b1310e7e94dbf24d49959856edfb3707668 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sat, 8 Jul 2017 02:00:49 -0700 Subject: [PATCH] rfb: Fix struct-vs-class warnings Clang doesn't like when struct and class are used to refer to the same thing interchangeably. Fixes all instances of: In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.cxx:29: In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.h:28: /home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: error: class 'Exception' was previously declared as a struct [-Werror,-Wmismatched-tags] class Exception; ^ /home/shade/dev/tigervnc/common/rdr/Exception.h:32:10: note: previous use is here struct Exception { ^ /home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: note: did you mean struct here? class Exception; ^~~~~ struct /home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: error: class 'Rect' was previously declared as a struct [-Werror,-Wmismatched-tags] class Rect; ^ /home/shade/dev/tigervnc/common/rfb/Rect.h:68:10: note: previous use is here struct Rect { ^ /home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: note: did you mean struct here? class Rect; ^~~~~ struct --- common/rfb/CMsgWriter.h | 2 +- common/rfb/DecodeManager.h | 4 ++-- common/rfb/Decoder.h | 3 ++- common/rfb/EncodeManager.h | 2 +- common/rfb/SMsgWriter.h | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/rfb/CMsgWriter.h b/common/rfb/CMsgWriter.h index 06ecbe7d..f9de72f3 100644 --- a/common/rfb/CMsgWriter.h +++ b/common/rfb/CMsgWriter.h @@ -33,7 +33,7 @@ namespace rfb { class PixelFormat; class ConnParams; - class ScreenSet; + struct ScreenSet; struct Rect; class CMsgWriter : public InputHandler { diff --git a/common/rfb/DecodeManager.h b/common/rfb/DecodeManager.h index fbb7f77c..2098063e 100644 --- a/common/rfb/DecodeManager.h +++ b/common/rfb/DecodeManager.h @@ -32,7 +32,7 @@ namespace os { } namespace rdr { - class Exception; + struct Exception; class MemOutStream; } @@ -40,7 +40,7 @@ namespace rfb { class CConnection; class Decoder; class ModifiablePixelBuffer; - class Rect; + struct Rect; class DecodeManager { public: diff --git a/common/rfb/Decoder.h b/common/rfb/Decoder.h index 3840b3fd..86ee4ef8 100644 --- a/common/rfb/Decoder.h +++ b/common/rfb/Decoder.h @@ -27,9 +27,10 @@ namespace rdr { namespace rfb { class ConnParams; class ModifiablePixelBuffer; - class Rect; class Region; + struct Rect; + enum DecoderFlags { // A constant for decoders that don't need anything special DecoderPlain = 0, diff --git a/common/rfb/EncodeManager.h b/common/rfb/EncodeManager.h index 79db950c..4319b427 100644 --- a/common/rfb/EncodeManager.h +++ b/common/rfb/EncodeManager.h @@ -32,7 +32,7 @@ namespace rfb { class PixelBuffer; class RenderedCursor; class Region; - class Rect; + struct Rect; struct RectInfo; diff --git a/common/rfb/SMsgWriter.h b/common/rfb/SMsgWriter.h index 548b8e8e..6c665b65 100644 --- a/common/rfb/SMsgWriter.h +++ b/common/rfb/SMsgWriter.h @@ -32,7 +32,7 @@ namespace rdr { class OutStream; } namespace rfb { class ConnParams; - class ScreenSet; + struct ScreenSet; class SMsgWriter { public: -- 2.39.5