aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/errors.h2
-rw-r--r--src/unicode.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/errors.h b/src/errors.h
index c3ccaf2..eebd607 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -3,6 +3,6 @@
#include <stdnoreturn.h>
-noreturn void err(const char *, ...);
+noreturn void err(const char *, ...) __attribute__((format(printf, 1, 2)));
#endif /* !ORYX_ERRORS_H */
diff --git a/src/unicode.h b/src/unicode.h
index 8b18d45..36bbc81 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -9,14 +9,14 @@
typedef uint32_t rune;
/* Assert that CH has the Unicode Pattern_White_Space property */
-bool rune_is_pat_ws(rune ch);
+bool rune_is_pat_ws(rune ch) __attribute__((const));
/* Assert that CH has the Unicode XID_Start or XID_Continue property. The
rune_is_xids() function extends XID_Start to include U+005F LOW LINE, and the
rune_is_xidc() function extends XID_Continue to include U+2032 PRIME,
U+2033 DOUBLE PRIME, U+2034 TRIPLE PRIME, and U+2057 QUADRUPLE PRIME. */
-bool rune_is_xids(rune ch);
-bool rune_is_xidc(rune ch);
+bool rune_is_xids(rune ch) __attribute__((const));
+bool rune_is_xidc(rune ch) __attribute__((const));
/* Decode the first UTF-8 rune in S, and point S to the next rune in the stream.
This function assumes that S points to a buffer that’s padded to a length of