Home
last modified time | relevance | path

Searched hist:"4 dfefa97" (Results 1 – 1 of 1) sorted by relevance

/openbmc/obmc-console/test/
H A Dringbuffer-test-utils.c4dfefa97 Tue May 02 01:23:16 CDT 2023 Andrew Jeffery <andrew@aj.id.au> test: ringbuffer-test-utils: Add stdlib.h for malloc()/free()

Include what we use to address clang-tidy issues:

```
Error while processing /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c.
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:25:2: error: call to undeclared library function 'free' with type 'void (void *)'; ISO C99 and later do not support implicit function declarations [clang-diagnostic-implicit-function-declaration]
free(ctx->data);
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:25:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:64:15: error: call to undeclared library function 'realloc' with type 'void *(void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [clang-diagnostic-implicit-function-declaration]
ctx->data = realloc(ctx->data, ctx->len + len);
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:64:15: note: include the header <stdlib.h> or explicitly provide a declaration for 'realloc'
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Icf6d9ab735fb035572e8953ec474afd81efa53e9