[Spice-commits] common/lz.h common/quic.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 26 09:26:13 UTC 2018


 common/lz.h   |    1 +
 common/quic.h |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit 258123318d26f88ffc8ac649155f6536e5503ba9
Author: Christophe de Dinechin <dinechin at redhat.com>
Date:   Tue Jun 26 11:04:41 2018 +0200

    Add SPICE_ATTR_NORETURN on prototype of error functions
    
    The error functions are supposed to not return.  Using the attribute
    documents that in the interface, and is better for the compiler
    because most noreturn-related optimizations and spurious warning
    eliminations happen at the call site.
    
    Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/common/lz.h b/common/lz.h
index 21ba1fa..23910b8 100644
--- a/common/lz.h
+++ b/common/lz.h
@@ -19,6 +19,7 @@ typedef void *LzContext;
 
 typedef struct LzUsrContext LzUsrContext;
 struct LzUsrContext {
+    SPICE_ATTR_NORETURN
     SPICE_ATTR_PRINTF(2, 3) void (*error)(LzUsrContext *usr, const char *fmt, ...);
     SPICE_ATTR_PRINTF(2, 3) void (*warn)(LzUsrContext *usr, const char *fmt, ...);
     SPICE_ATTR_PRINTF(2, 3) void (*info)(LzUsrContext *usr, const char *fmt, ...);
diff --git a/common/quic.h b/common/quic.h
index 7c1da85..398fb09 100644
--- a/common/quic.h
+++ b/common/quic.h
@@ -41,6 +41,7 @@ typedef void *QuicContext;
 
 typedef struct QuicUsrContext QuicUsrContext;
 struct QuicUsrContext {
+    SPICE_ATTR_NORETURN
     SPICE_ATTR_PRINTF(2, 3) void (*error)(QuicUsrContext *usr, const char *fmt, ...);
     SPICE_ATTR_PRINTF(2, 3) void (*warn)(QuicUsrContext *usr, const char *fmt, ...);
     SPICE_ATTR_PRINTF(2, 3) void (*info)(QuicUsrContext *usr, const char *fmt, ...);


More information about the Spice-commits mailing list