-Wno-error=unused-result is applied to tests/logger since it's a test module.
[ 160s] logger.c: In function 'dump_logger':
[ 160s] logger.c:33:27: error: initialization of 'struct logger_entry *'
from incompatible pointer type 'char *' [-Werror=incompatible-pointer-types]
[ 160s] 33 | struct logger_entry *e = buf;
...
[ 160s] logger.c: In function 'tstart':
[ 160s] logger.c:24:2: error: ignoring return value of 'write', declared with
attribute warn_unused_result [-Werror=unused-result]
[ 160s] 24 | write(*fd, "child thread msg #1\nchild thread msg #2", 39);
[ 160s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
Change-Id: I1496c7591031e3c61c3b3646712d641bdbdbdfe9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit
875d16f878a8b4a67ca7d2e6ca4549cea9392e81)
CFLAGS += -I../../include/uapi
CFLAGS += -std=gnu99
CFLAGS += -D_GNU_SOURCE
+CFLAGS += -Wno-error=unused-result
LDFLAGS = -pthread
.PHONY: all clean
int fd;
int ret = 0;
char buf[sizeof(struct logger_entry) + LOGGER_ENTRY_MAX_PAYLOAD];
- struct logger_entry *e = buf;
+ struct logger_entry *e = (struct logger_entry *)buf;
int version = 2;
fd = open(device, O_RDONLY | O_NONBLOCK);