[PATCH v2 1/2] Fix clang build error on [[noreturn]]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christophe de Dinechin <dinechin@xxxxxxxxxx>

The [[noreturn]] attribute must be visible from call sites.
This is a hard error in clang:

cursor-updater.cpp:77:3: error: function declared '[[noreturn]]' after its first declaration
[[noreturn]] void CursorUpdater::operator()()
 ^
./cursor-updater.hpp:24:10: note: declaration missing '[[noreturn]]' attribute is here
   void operator()();
        ^
1 error generated.

Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
---
 src/cursor-updater.cpp | 2 +-
 src/cursor-updater.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cursor-updater.cpp b/src/cursor-updater.cpp
index 8f65e83..9f39c7b 100644
--- a/src/cursor-updater.cpp
+++ b/src/cursor-updater.cpp
@@ -74,7 +74,7 @@ CursorUpdater::CursorUpdater(StreamPort *stream_port) : stream_port(stream_port)
     XFixesSelectCursorInput(display, DefaultRootWindow(display), XFixesDisplayCursorNotifyMask);
 }
 
-[[noreturn]] void CursorUpdater::operator()()
+void CursorUpdater::operator()()
 {
     unsigned long last_serial = 0;
 
diff --git a/src/cursor-updater.hpp b/src/cursor-updater.hpp
index d5f00af..6dbadac 100644
--- a/src/cursor-updater.hpp
+++ b/src/cursor-updater.hpp
@@ -21,7 +21,7 @@ class CursorUpdater
 public:
     CursorUpdater(StreamPort *stream_port);
 
-    void operator()();
+    [[noreturn]] void operator()();
 
 private:
     StreamPort *stream_port;
-- 
2.13.5 (Apple Git-94)

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]