Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+12 -4
+6 -1
tools/testing/selftests/net/af_unix/Makefile
··· 1 - CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end 1 + top_srcdir := ../../../../.. 2 + include $(top_srcdir)/scripts/Makefile.compiler 3 + 4 + cc-option = $(call __cc-option, $(CC),,$(1),$(2)) 5 + 6 + CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end) 2 7 3 8 TEST_GEN_PROGS := \ 4 9 diag_uid \
+4 -2
tools/testing/selftests/net/lib/ksft.h
··· 24 24 fd = STDOUT_FILENO; 25 25 } 26 26 27 - write(fd, msg, sizeof(msg)); 27 + if (write(fd, msg, sizeof(msg)) < 0) 28 + perror("write()"); 28 29 if (fd != STDOUT_FILENO) 29 30 close(fd); 30 31 } ··· 49 48 fd = STDIN_FILENO; 50 49 } 51 50 52 - read(fd, &byte, sizeof(byte)); 51 + if (read(fd, &byte, sizeof(byte)) < 0) 52 + perror("read()"); 53 53 if (fd != STDIN_FILENO) 54 54 close(fd); 55 55 }
+2 -1
tools/testing/selftests/net/tfo.c
··· 81 81 if (getsockopt(connfd, SOL_SOCKET, SO_INCOMING_NAPI_ID, &opt, &len) < 0) 82 82 error(1, errno, "getsockopt(SO_INCOMING_NAPI_ID)"); 83 83 84 - read(connfd, buf, 64); 84 + if (read(connfd, buf, 64) < 0) 85 + perror("read()"); 85 86 fprintf(outfile, "%d\n", opt); 86 87 87 88 fclose(outfile);