mesa: Fix linker-assigned varying component counting since 8fb1e4a462
[mesa.git] / src / glsl / ralloc.h
index 86306b1f558d3b7c7bfdda41faf3b51ed003b7de..67eb93833e6a6973499fb8f598199c1d7070fdf4 100644 (file)
@@ -54,6 +54,7 @@ extern "C" {
 #include <stddef.h>
 #include <stdarg.h>
 #include <stdbool.h>
+#include "main/compiler.h"
 
 /**
  * \def ralloc(ctx, type)
@@ -301,7 +302,7 @@ bool ralloc_strncat(char **dest, const char *str, size_t n);
  *
  * \return The newly allocated string.
  */
-char *ralloc_asprintf (const void *ctx, const char *fmt, ...);
+char *ralloc_asprintf (const void *ctx, const char *fmt, ...) PRINTFLIKE(2, 3);
 
 /**
  * Print to a string, given a va_list.
@@ -334,7 +335,8 @@ char *ralloc_vasprintf(const void *ctx, const char *fmt, va_list args);
  * \return True unless allocation failed.
  */
 bool ralloc_asprintf_rewrite_tail(char **str, size_t *start,
-                                 const char *fmt, ...);
+                                 const char *fmt, ...)
+                                 PRINTFLIKE(3, 4);
 
 /**
  * Rewrite the tail of an existing string, starting at a given index.
@@ -376,7 +378,8 @@ bool ralloc_vasprintf_rewrite_tail(char **str, size_t *start, const char *fmt,
  *
  * \return True unless allocation failed.
  */
-bool ralloc_asprintf_append (char **str, const char *fmt, ...);
+bool ralloc_asprintf_append (char **str, const char *fmt, ...)
+                            PRINTFLIKE(2, 3);
 
 /**
  * Append formatted text to the supplied string, given a va_list.