poke-devel
[Top][All Lists]
Advanced

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

[PATCH 1/3] Add sentinel attributes as appropriate


From: John Darrington
Subject: [PATCH 1/3] Add sentinel attributes as appropriate
Date: Mon, 1 Jun 2020 13:16:43 +0200

---
 common/pk-utils.h | 2 +-
 libpoke/libpoke.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/pk-utils.h b/common/pk-utils.h
index e3db7c76..54d4c51b 100644
--- a/common/pk-utils.h
+++ b/common/pk-utils.h
@@ -51,7 +51,7 @@ uint64_t pk_upow (uint64_t base, uint32_t exp);
 void pk_print_binary (void (*puts_fn) (const char *str), uint64_t val, int 
size, int sign);
 
 /* Concatenate string arguments into an malloc'ed string. */
-char *pk_str_concat (const char *s0, ...);
+char *pk_str_concat (const char *s0, ...) __attribute__ ((sentinel));
 
 /* Replace all occurrences of SEARCH within IN by REPLACE. */
 char *pk_str_replace (const char *in, const char *search, const char *replace);
diff --git a/libpoke/libpoke.h b/libpoke/libpoke.h
index 5289a310..b44d6715 100644
--- a/libpoke/libpoke.h
+++ b/libpoke/libpoke.h
@@ -346,7 +346,8 @@ int pk_defvar (pk_compiler pkc, const char *varname, pk_val 
val);
    execution of the function results in an unhandled exception.
    Return 1 otherwise.  */
 
-int pk_call (pk_compiler pkc, pk_val cls, pk_val *ret, ...);
+int pk_call (pk_compiler pkc, pk_val cls, pk_val *ret, ...)
+  __attribute__ ((sentinel));
 
 /* Get and set properties of the incremental compiler.  */
 
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]