mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
Merge branch 'selftests-fix-build-warnings-and-errors' (part)
Guenter Roeck says: ==================== selftests: Fix build warnings and errors This series fixes build warnings and errors observed when trying to build selftests. ==================== Link: https://patch.msgid.link/20251205171010.515236-1-linux@roeck-us.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
2f6e056e95
|
|
@ -1,4 +1,9 @@
|
|||
CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end
|
||||
top_srcdir := ../../../../..
|
||||
include $(top_srcdir)/scripts/Makefile.compiler
|
||||
|
||||
cc-option = $(call __cc-option, $(CC),,$(1),$(2))
|
||||
|
||||
CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end)
|
||||
|
||||
TEST_GEN_PROGS := \
|
||||
diag_uid \
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ static inline void ksft_ready(void)
|
|||
fd = STDOUT_FILENO;
|
||||
}
|
||||
|
||||
write(fd, msg, sizeof(msg));
|
||||
if (write(fd, msg, sizeof(msg)) < 0)
|
||||
perror("write()");
|
||||
if (fd != STDOUT_FILENO)
|
||||
close(fd);
|
||||
}
|
||||
|
|
@ -48,7 +49,8 @@ static inline void ksft_wait(void)
|
|||
fd = STDIN_FILENO;
|
||||
}
|
||||
|
||||
read(fd, &byte, sizeof(byte));
|
||||
if (read(fd, &byte, sizeof(byte)) < 0)
|
||||
perror("read()");
|
||||
if (fd != STDIN_FILENO)
|
||||
close(fd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ static void run_server(void)
|
|||
if (getsockopt(connfd, SOL_SOCKET, SO_INCOMING_NAPI_ID, &opt, &len) < 0)
|
||||
error(1, errno, "getsockopt(SO_INCOMING_NAPI_ID)");
|
||||
|
||||
read(connfd, buf, 64);
|
||||
if (read(connfd, buf, 64) < 0)
|
||||
perror("read()");
|
||||
fprintf(outfile, "%d\n", opt);
|
||||
|
||||
fclose(outfile);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user