bt_secure_getenv(): add missing `unused` attribute for log level
[babeltrace.git] / src / compat / memstream.h
index 30d974ca4aaf748fba791d7f19c476f0b6721e66..374a5e729a2a644058b6f8d6292ad534084023cb 100644 (file)
@@ -174,7 +174,10 @@ FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
 }
 
 static inline
-int bt_close_memstream(char **buf, size_t *size, FILE *fp)
+int bt_close_memstream(
+               char **buf __attribute__((unused)),
+               size_t *size __attribute__((unused)),
+               FILE *fp)
 {
        return fclose(fp);
 }
@@ -194,7 +197,8 @@ int bt_close_memstream(char **buf, size_t *size, FILE *fp)
  * into the buffer (which we allocate).
  */
 static inline
-FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
+FILE *bt_open_memstream(char **ptr __attribute__((unused)),
+               size_t *sizeloc __attribute__((unused)))
 {
        char *tmpname;
        FILE *fp;
@@ -233,7 +237,8 @@ error_free:
  * into the buffer (which we allocate).
  */
 static inline
-FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
+FILE *bt_open_memstream(char **ptr __attribute__((unused)),
+               size_t *sizeloc __attribute__((unused)))
 {
        char *tmpname;
        int ret;
@@ -299,7 +304,7 @@ int bt_close_memstream(char **buf, size_t *size, FILE *fp)
        }
        *size = pos;
        /* add final \0 */
-       *buf = calloc(pos + 1, sizeof(char));
+       *buf = (char *) calloc(pos + 1, sizeof(char));
        if (!*buf) {
                return -ENOMEM;
        }
This page took 0.023674 seconds and 4 git commands to generate.