On Sun, Mar 21, 2021 at 09:30:42AM -0700, Cole Helbling wrote: > On Sun Mar 21, 2021 at 7:46 AM PDT, Alyssa Ross wrote: > > clang-tidy also produced this warning: > > > > /home/src/ucspi-vsock/repro.c:43:19: warning: unused parameter 'sig' [clang-diagnostic-unused-parameter] > > void sig_exit(int sig) { exit(EX_UNAVAILABLE); } > > ^ > > vsock.c:27:23: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] > > if (addr->svm_family != AF_VSOCK) { > > ^ > > vsock.c:90:6: note: Assuming the condition is false > > if (getsockname(fd, (struct sockaddr *)&addr, &addrlen) == -1) > > ^ > > vsock.c:90:2: note: Taking false branch > > if (getsockname(fd, (struct sockaddr *)&addr, &addrlen) == -1) > > ^ > > vsock.c:93:9: note: Calling 'fill_cid_and_port' > > return fill_cid_and_port(&addr, cid, port); > > ^ > > vsock.c:27:23: note: The left operand of '!=' is a garbage value > > if (addr->svm_family != AF_VSOCK) { > > > > But I think this is just warning me that the POSIX socket API violates > > the strict aliasing rule. (Which is true, but there's not a lot I can > > do about it...) > > > > It also tells me I should use memset_s instead of memset, but, well... > > https://en.wikipedia.org/wiki/C11_(C_standard_revision)#Criticism > > > > Alyssa Ross (2): > > exec: free argv if exec fails > > vsockserver: fix uninitialized variable > > > > exec.c | 5 ++++- > > vsockserver.c | 2 +- > > 2 files changed, 5 insertions(+), 2 deletions(-) > > > > -- > > 2.30.0 > > Patchset LGTM. > > Reviewed-by: Cole Helbling Thanks! To ssh://atuin/home/spectrum/git/ucspi-vsock.git 20a27f1..8b690b9 8b690b9 -> master > (I should really make a macro or something for that ^, so I don't have > to type it out every time and potentially make a mistake :D)