X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fcompat%2Fmemstream.h;h=374a5e729a2a644058b6f8d6292ad534084023cb;hb=84268ffbf1f963892215dc91ccec78367ee31f5e;hp=30d974ca4aaf748fba791d7f19c476f0b6721e66;hpb=516bf0a77e025cfccce2fa400b757e94dc0bf1d8;p=babeltrace.git diff --git a/src/compat/memstream.h b/src/compat/memstream.h index 30d974ca..374a5e72 100644 --- a/src/compat/memstream.h +++ b/src/compat/memstream.h @@ -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; }