[Spice-devel] [PATCH v2 1/2] Fix clang build error on [[noreturn]]
Christophe Fergeau
cfergeau at redhat.com
Wed Jul 18 08:49:34 UTC 2018
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Tue, Jul 17, 2018 at 05:56:14PM +0200, Christophe de Dinechin wrote:
> From: Christophe de Dinechin <dinechin at redhat.com>
>
> 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 at redhat.com>
> ---
> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180718/1142b7e6/attachment.sig>
More information about the Spice-devel
mailing list