cmake: replace the way clang-tidy verifies tests, fix issues found#17705
Closed
vszakats wants to merge 26 commits intocurl:masterfrom
Closed
cmake: replace the way clang-tidy verifies tests, fix issues found#17705vszakats wants to merge 26 commits intocurl:masterfrom
vszakats wants to merge 26 commits intocurl:masterfrom
Conversation
vszakats
added a commit
that referenced
this pull request
Jun 22, 2025
The c-ares header directory was added to the header path within `lib`, as opposed to every other dependency which added them in the root `CMakeLists.txt`. Such exception is no longer necessary. This patch aligns c-ares header setup with the rest of dependencies. And also with autotools, which also makes no exception here. Cherry-picked from #17705 Cherry-picked from #16973 Closes #17707
cm: add ugly workaround for tunits/units for clang-tidy
libtests tweak generate file path before passing to clang-tidy to make it find it
hook up tests clang-tidy targets to testdeps
cm disable clang-tidy for the bundle target
Optionally, can exclude headers from clang-tidy scrutiny with this:
string(REGEX REPLACE "[a-z0-9_./]+.h;" "" _sources "${_sources};") # strip headers
420778a to
24a4222
Compare
```
/Users/runner/work/curl/curl/tests/server/mqttd.c:484:41: error: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
484 | payload_len = (size_t)(buffer[10] << 8) | buffer[11];
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:876:9: note: Assuming 'argc' is <= 'arg'
876 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:876:3: note: Loop condition is false. Execution continues on line 957
876 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:965:3: note: Loop condition is false. Exiting loop
965 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:966:3: note: Loop condition is false. Exiting loop
966 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:967:3: note: Loop condition is false. Exiting loop
967 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:972:6: note: Assuming 'use_ipv6' is true
972 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:972:3: note: Taking false branch
972 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:980:3: note: Taking false branch
980 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:989:5: note: Taking false branch
989 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:999:6: note: Assuming 'wrotepidfile' is not equal to 0
999 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:999:3: note: Taking false branch
999 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1004:6: note: Assuming 'wroteportfile' is not equal to 0
1004 | if(!wroteportfile) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:1004:3: note: Taking false branch
1004 | if(!wroteportfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1009:20: note: Calling 'mqttd_incoming'
1009 | juggle_again = mqttd_incoming(sock);
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:647:6: note: Assuming 'got_exit_signal' is 0
647 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:647:3: note: Taking false branch
647 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:654:6: note: Assuming the condition is false
654 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:654:3: note: Taking false branch
654 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:683:10: note: Assuming 'got_exit_signal' is 0
683 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:683:7: note: Taking false branch
683 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:14: note: Assuming the condition is false
687 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:24: note: Left side of '&&' is false
687 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:680:5: note: Loop condition is false. Exiting loop
680 | do {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:689:8: note: Assuming 'rc' is >= 0
689 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:689:5: note: Taking false branch
689 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:695:8: note: Assuming the condition is true
695 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:695:5: note: Taking true branch
695 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:697:7: note: Taking false branch
697 | if(CURL_SOCKET_BAD == newfd) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:705:15: note: Calling 'mqttit'
705 | (void)mqttit(newfd); /* until done */
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:425:10: note: Assuming that 'fopen' is successful
425 | dump = fopen(dumpfile, "ab");
| ^~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:7: note: 'dump' is non-null
426 | if(!dump)
| ^~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:3: note: Taking false branch
426 | if(!dump)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:6: note: Assuming 'testno' is 0
433 | if(testno)
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:3: note: Taking false branch
433 | if(testno)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:436:12: note: Storing uninitialized value
436 | buffer = malloc(buff_size);
| ^~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:6: note: Assuming 'buffer' is non-null
437 | if(!buffer) {
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:3: note: Taking false branch
437 | if(!buffer) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Calling 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:6: note: Assuming 'rc' is >= 2
377 | if(rc < 2) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:3: note: Taking false branch
377 | if(rc < 2) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:387:3: note: Loop condition is false. Execution continues on line 395
387 | while(buffer[i] & 0x80) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:398:3: note: Returning zero, which participates in a condition later
398 | return 0;
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Returning from 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:8: note: 'rc' is 0
452 | if(rc)
| ^~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:5: note: Taking false branch
452 | if(rc)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:8: note: Assuming 'remaining_length' is < 'buff_size'
455 | if(remaining_length >= buff_size) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:5: note: Taking false branch
455 | if(remaining_length >= buff_size) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:8: note: Assuming 'remaining_length' is 0
466 | if(remaining_length) {
| ^~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:5: note: Taking false branch
466 | if(remaining_length) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:8: note: Assuming 'byte' is equal to MQTT_MSG_CONNECT
475 | if(byte == MQTT_MSG_CONNECT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:5: note: Taking true branch
475 | if(byte == MQTT_MSG_CONNECT) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:476:7: note: Calling 'logprotocol'
476 | logprotocol(FROM_CLIENT, "CONNECT", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:14: note: 'i' is >= 'len'
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:22: note: Left side of '&&' is false
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: 'dir' is equal to FROM_CLIENT
140 | dir == FROM_CLIENT ? "client" : "server",
| ^~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: '?' condition is true
/Users/runner/work/curl/curl/tests/server/mqttd.c:476:7: note: Returning from 'logprotocol'
476 | logprotocol(FROM_CLIENT, "CONNECT", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:479:10: note: Assuming the condition is false
479 | if(memcmp(protocol, buffer, sizeof(protocol))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:479:7: note: Taking false branch
479 | if(memcmp(protocol, buffer, sizeof(protocol))) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:484:41: note: The left operand of '<<' is a garbage value
484 | payload_len = (size_t)(buffer[10] << 8) | buffer[11];
| ~~~~~~~~~~ ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:602:45: error: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
602 | topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:876:9: note: Assuming 'argc' is <= 'arg'
876 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:876:3: note: Loop condition is false. Execution continues on line 957
876 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:965:3: note: Loop condition is false. Exiting loop
965 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:966:3: note: Loop condition is false. Exiting loop
966 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:967:3: note: Loop condition is false. Exiting loop
967 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:972:6: note: Assuming 'use_ipv6' is true
972 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:972:3: note: Taking false branch
972 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:980:3: note: Taking false branch
980 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:989:5: note: Taking false branch
989 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:999:6: note: Assuming 'wrotepidfile' is not equal to 0
999 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:999:3: note: Taking false branch
999 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1004:6: note: Assuming 'wroteportfile' is not equal to 0
1004 | if(!wroteportfile) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:1004:3: note: Taking false branch
1004 | if(!wroteportfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1009:20: note: Calling 'mqttd_incoming'
1009 | juggle_again = mqttd_incoming(sock);
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:647:6: note: Assuming 'got_exit_signal' is 0
647 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:647:3: note: Taking false branch
647 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:654:6: note: Assuming the condition is false
654 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:654:3: note: Taking false branch
654 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:683:10: note: Assuming 'got_exit_signal' is 0
683 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:683:7: note: Taking false branch
683 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:14: note: Assuming the condition is false
687 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:24: note: Left side of '&&' is false
687 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:680:5: note: Loop condition is false. Exiting loop
680 | do {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:689:8: note: Assuming 'rc' is >= 0
689 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:689:5: note: Taking false branch
689 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:695:8: note: Assuming the condition is true
695 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:695:5: note: Taking true branch
695 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:697:7: note: Taking false branch
697 | if(CURL_SOCKET_BAD == newfd) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:705:15: note: Calling 'mqttit'
705 | (void)mqttit(newfd); /* until done */
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:425:10: note: Assuming that 'fopen' is successful
425 | dump = fopen(dumpfile, "ab");
| ^~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:7: note: 'dump' is non-null
426 | if(!dump)
| ^~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:3: note: Taking false branch
426 | if(!dump)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:6: note: Assuming 'testno' is 0
433 | if(testno)
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:3: note: Taking false branch
433 | if(testno)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:436:12: note: Storing uninitialized value
436 | buffer = malloc(buff_size);
| ^~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:6: note: Assuming 'buffer' is non-null
437 | if(!buffer) {
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:3: note: Taking false branch
437 | if(!buffer) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Calling 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:6: note: Assuming 'rc' is >= 2
377 | if(rc < 2) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:3: note: Taking false branch
377 | if(rc < 2) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:387:3: note: Loop condition is false. Execution continues on line 395
387 | while(buffer[i] & 0x80) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:398:3: note: Returning zero, which participates in a condition later
398 | return 0;
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Returning from 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:8: note: 'rc' is 0
452 | if(rc)
| ^~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:5: note: Taking false branch
452 | if(rc)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:8: note: Assuming 'remaining_length' is < 'buff_size'
455 | if(remaining_length >= buff_size) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:5: note: Taking false branch
455 | if(remaining_length >= buff_size) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:8: note: Assuming 'remaining_length' is 0
466 | if(remaining_length) {
| ^~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:5: note: Taking false branch
466 | if(remaining_length) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:8: note: Assuming 'byte' is not equal to MQTT_MSG_CONNECT
475 | if(byte == MQTT_MSG_CONNECT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:5: note: Taking false branch
475 | if(byte == MQTT_MSG_CONNECT) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:531:13: note: Assuming 'byte' is not equal to MQTT_MSG_SUBSCRIBE
531 | else if(byte == MQTT_MSG_SUBSCRIBE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:531:10: note: Taking false branch
531 | else if(byte == MQTT_MSG_SUBSCRIBE) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:595:13: note: Assuming the condition is true
595 | else if((byte & 0xf0) == (MQTT_MSG_PUBLISH & 0xf0)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:595:10: note: Taking true branch
595 | else if((byte & 0xf0) == (MQTT_MSG_PUBLISH & 0xf0)) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:599:7: note: Calling 'logprotocol'
599 | logprotocol(FROM_CLIENT, "PUBLISH", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:14: note: 'i' is >= 'len'
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:22: note: Left side of '&&' is false
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: 'dir' is equal to FROM_CLIENT
140 | dir == FROM_CLIENT ? "client" : "server",
| ^~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: '?' condition is true
/Users/runner/work/curl/curl/tests/server/mqttd.c:599:7: note: Returning from 'logprotocol'
599 | logprotocol(FROM_CLIENT, "PUBLISH", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:602:45: note: The left operand of '<<' is a garbage value
602 | topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
| ~~~~~~~~~~~~~~~~~ ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:666:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
666 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:666:5: note: The bzero() function is obsoleted by memset()
666 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:667:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
667 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:667:5: note: The bzero() function is obsoleted by memset()
667 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:668:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
668 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:668:5: note: The bzero() function is obsoleted by memset()
668 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: note: The bzero() function is obsoleted by memset()
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: note: The bzero() function is obsoleted by memset()
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: note: The bzero() function is obsoleted by memset()
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615) [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:9: note: Assuming 'argc' is <= 'arg'
1368 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:3: note: Loop condition is false. Execution continues on line 1473
1368 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1473:3: note: Loop condition is false. Exiting loop
1473 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1474:3: note: Loop condition is false. Exiting loop
1474 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1475:3: note: Loop condition is false. Exiting loop
1475 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:6: note: Assuming 'use_ipv6' is true
1480 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:3: note: Taking false branch
1480 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1488:3: note: Taking false branch
1488 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:6: note: Assuming 'server_connectport' is not equal to 0
1495 | if(server_connectport) {
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:3: note: Taking true branch
1495 | if(server_connectport) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:8: note: Assuming 'use_ipv6' is true
1499 | if(!use_ipv6) {
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:5: note: Taking false branch
1499 | if(!use_ipv6) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1515:26: note: '?' condition is false
1515 | me.sa6.sin6_port = htons(server_connectport);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_endian.h:134:25: note: expanded from macro 'htons'
134 | #define htons(x) __DARWIN_OSSwapInt16(x)
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/libkern/_OSByteOrder.h:85:19: note: expanded from macro '__DARWIN_OSSwapInt16'
85 | ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:11: note: 'addr' is null
1516 | if(!addr)
| ^~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:7: note: Taking true branch
1516 | if(!addr)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:8: note: 'rc' is 0
1523 | if(rc) {
| ^~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:5: note: Taking false branch
1523 | if(rc) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:6: note: Assuming 'server_connectport' is not equal to 0
1545 | if(server_connectport)
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:3: note: Taking true branch
1545 | if(server_connectport)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:6: note: Assuming 'wrotepidfile' is not equal to 0
1553 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:3: note: Taking false branch
1553 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:6: note: Assuming 'portname' is null
1557 | if(portname) {
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:3: note: Taking false branch
1557 | if(portname) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1566:20: note: Calling 'juggle'
1566 | juggle_again = juggle(&msgsock, sock, &mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:942:3: note: 'buffer' initialized here
942 | unsigned char buffer[BUFFER_SIZE];
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:6: note: Assuming 'got_exit_signal' is 0
945 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:3: note: Taking false branch
945 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:6: note: Assuming the condition is false
953 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:3: note: Taking false branch
953 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:975:3: note: Control jumps to 'case ACTIVE:' at line 1015
975 | switch(*mode) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1019:5: note: Taking true branch
1019 | if(CURL_SOCKET_BAD != sockfd) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1034:5: note: Execution continues on line 1050
1034 | break;
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:8: note: Assuming 'got_exit_signal' is 0
1052 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:5: note: Taking false branch
1052 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:12: note: Assuming the condition is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:22: note: Left side of '&&' is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1046:3: note: Loop condition is false. Exiting loop
1046 | do {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:6: note: Assuming 'rc' is >= 0
1059 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:3: note: Taking false branch
1059 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:6: note: Assuming 'rc' is not equal to 0
1065 | if(rc == 0)
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:3: note: Taking false branch
1065 | if(rc == 0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:6: note: Assuming the condition is true
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:3: note: Taking true branch
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1087:5: note: Taking false branch
1087 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:8: note: Assuming the condition is false
1093 | if(!memcmp("PING", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:5: note: Taking false branch
1093 | if(!memcmp("PING", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:13: note: Assuming the condition is false
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:10: note: Taking false branch
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:13: note: Assuming the condition is false
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:10: note: Taking false branch
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:13: note: Assuming the condition is true
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:10: note: Taking true branch
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Calling 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:375:3: note: Taking false branch
375 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:380:3: note: Value assigned to 'buffer_len'
380 | *buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:6: note: Assuming the condition is false
381 | if(*buffer_len > maxlen) {
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:3: note: Taking false branch
381 | if(*buffer_len > maxlen) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Calling 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:6: note: Assuming 'nread' is equal to 'nbytes'
292 | if(nread != (ssize_t)nbytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:3: note: Taking false branch
292 | if(nread != (ssize_t)nbytes) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Returning from 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:3: note: Taking false branch
388 | if(!read_stdin(buffer, *buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Returning from 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:7: note: Taking false branch
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1121:7: note: Taking false branch
1121 | if(*mode == PASSIVE_LISTEN) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: note: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615)
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
185 | (SEND_QUAL_ARG2 SEND_TYPE_ARG2)CURL_UNCONST(y), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186 | (SEND_TYPE_ARG3)(z), \
| ~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: note: The bzero() function is obsoleted by memset()
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: note: The bzero() function is obsoleted by memset()
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: note: The bzero() function is obsoleted by memset()
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: note: The bzero() function is obsoleted by memset()
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: note: The bzero() function is obsoleted by memset()
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: note: The bzero() function is obsoleted by memset()
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: note: The bzero() function is obsoleted by memset()
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: note: The bzero() function is obsoleted by memset()
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: note: The bzero() function is obsoleted by memset()
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: note: The bzero() function is obsoleted by memset()
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
FAILED: [code=1] tests/server/CMakeFiles/servers-clang-tidy
```
https://github.com/curl/curl/actions/runs/15807440504/job/44554216116?pr=17705#step:14:316
```
/Users/runner/work/curl/curl/tests/server/mqttd.c:606:45: error: The left operand of '<<' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
606 | topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:880:9: note: Assuming 'argc' is <= 'arg'
880 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:880:3: note: Loop condition is false. Execution continues on line 961
880 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:969:3: note: Loop condition is false. Exiting loop
969 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:970:3: note: Loop condition is false. Exiting loop
970 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:971:3: note: Loop condition is false. Exiting loop
971 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:976:6: note: Assuming 'use_ipv6' is true
976 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:976:3: note: Taking false branch
976 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:984:3: note: Taking false branch
984 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:993:5: note: Taking false branch
993 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1003:6: note: Assuming 'wrotepidfile' is not equal to 0
1003 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:1003:3: note: Taking false branch
1003 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1008:6: note: Assuming 'wroteportfile' is not equal to 0
1008 | if(!wroteportfile) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:1008:3: note: Taking false branch
1008 | if(!wroteportfile) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:1013:20: note: Calling 'mqttd_incoming'
1013 | juggle_again = mqttd_incoming(sock);
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:651:6: note: Assuming 'got_exit_signal' is 0
651 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:651:3: note: Taking false branch
651 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:658:6: note: Assuming the condition is false
658 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:658:3: note: Taking false branch
658 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:10: note: Assuming 'got_exit_signal' is 0
687 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:687:7: note: Taking false branch
687 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:691:14: note: Assuming the condition is false
691 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:691:24: note: Left side of '&&' is false
691 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:684:5: note: Loop condition is false. Exiting loop
684 | do {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:693:8: note: Assuming 'rc' is >= 0
693 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:693:5: note: Taking false branch
693 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:699:8: note: Assuming the condition is true
699 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:699:5: note: Taking true branch
699 | if(FD_ISSET(sockfd, &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:701:7: note: Taking false branch
701 | if(CURL_SOCKET_BAD == newfd) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:709:15: note: Calling 'mqttit'
709 | (void)mqttit(newfd); /* until done */
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:425:10: note: Assuming that 'fopen' is successful
425 | dump = fopen(dumpfile, "ab");
| ^~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:7: note: 'dump' is non-null
426 | if(!dump)
| ^~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:426:3: note: Taking false branch
426 | if(!dump)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:6: note: Assuming 'testno' is 0
433 | if(testno)
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:433:3: note: Taking false branch
433 | if(testno)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:436:12: note: Storing uninitialized value
436 | buffer = malloc(buff_size);
| ^~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:6: note: Assuming 'buffer' is non-null
437 | if(!buffer) {
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:437:3: note: Taking false branch
437 | if(!buffer) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Calling 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:6: note: Assuming 'rc' is >= 2
377 | if(rc < 2) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:377:3: note: Taking false branch
377 | if(rc < 2) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:387:3: note: Loop condition is false. Execution continues on line 395
387 | while(buffer[i] & 0x80) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:398:3: note: Returning zero, which participates in a condition later
398 | return 0;
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:451:10: note: Returning from 'fixedheader'
451 | rc = fixedheader(fd, &byte, &remaining_length, &bytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:8: note: 'rc' is 0
452 | if(rc)
| ^~
/Users/runner/work/curl/curl/tests/server/mqttd.c:452:5: note: Taking false branch
452 | if(rc)
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:8: note: Assuming 'remaining_length' is < 'buff_size'
455 | if(remaining_length >= buff_size) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:455:5: note: Taking false branch
455 | if(remaining_length >= buff_size) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:8: note: Assuming 'remaining_length' is 0
466 | if(remaining_length) {
| ^~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:466:5: note: Taking false branch
466 | if(remaining_length) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:8: note: Assuming 'byte' is not equal to MQTT_MSG_CONNECT
475 | if(byte == MQTT_MSG_CONNECT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:475:5: note: Taking false branch
475 | if(byte == MQTT_MSG_CONNECT) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:535:13: note: Assuming 'byte' is not equal to MQTT_MSG_SUBSCRIBE
535 | else if(byte == MQTT_MSG_SUBSCRIBE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:535:10: note: Taking false branch
535 | else if(byte == MQTT_MSG_SUBSCRIBE) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:599:13: note: Assuming the condition is true
599 | else if((byte & 0xf0) == (MQTT_MSG_PUBLISH & 0xf0)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:599:10: note: Taking true branch
599 | else if((byte & 0xf0) == (MQTT_MSG_PUBLISH & 0xf0)) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:603:7: note: Calling 'logprotocol'
603 | logprotocol(FROM_CLIENT, "PUBLISH", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:14: note: 'i' is >= 'len'
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:134:22: note: Left side of '&&' is false
134 | for(i = 0; i < len && (left >= 0); i++) {
| ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: 'dir' is equal to FROM_CLIENT
140 | dir == FROM_CLIENT ? "client" : "server",
| ^~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:140:11: note: '?' condition is true
/Users/runner/work/curl/curl/tests/server/mqttd.c:603:7: note: Returning from 'logprotocol'
603 | logprotocol(FROM_CLIENT, "PUBLISH", remaining_length,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604 | dump, buffer, rc);
| ~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:606:45: note: The left operand of '<<' is a garbage value
606 | topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
| ~~~~~~~~~~~~~~~~~ ^
/Users/runner/work/curl/curl/tests/server/mqttd.c:670:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
670 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:670:5: note: The bzero() function is obsoleted by memset()
670 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:671:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
671 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:671:5: note: The bzero() function is obsoleted by memset()
671 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:672:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
672 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:672:5: note: The bzero() function is obsoleted by memset()
672 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: note: The bzero() function is obsoleted by memset()
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: note: The bzero() function is obsoleted by memset()
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: note: The bzero() function is obsoleted by memset()
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615) [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:9: note: Assuming 'argc' is <= 'arg'
1368 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:3: note: Loop condition is false. Execution continues on line 1473
1368 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1473:3: note: Loop condition is false. Exiting loop
1473 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1474:3: note: Loop condition is false. Exiting loop
1474 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1475:3: note: Loop condition is false. Exiting loop
1475 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:6: note: Assuming 'use_ipv6' is true
1480 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:3: note: Taking false branch
1480 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1488:3: note: Taking false branch
1488 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:6: note: Assuming 'server_connectport' is not equal to 0
1495 | if(server_connectport) {
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:3: note: Taking true branch
1495 | if(server_connectport) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:8: note: Assuming 'use_ipv6' is true
1499 | if(!use_ipv6) {
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:5: note: Taking false branch
1499 | if(!use_ipv6) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1515:26: note: '?' condition is false
1515 | me.sa6.sin6_port = htons(server_connectport);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_endian.h:134:25: note: expanded from macro 'htons'
134 | #define htons(x) __DARWIN_OSSwapInt16(x)
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/libkern/_OSByteOrder.h:85:19: note: expanded from macro '__DARWIN_OSSwapInt16'
85 | ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:11: note: 'addr' is null
1516 | if(!addr)
| ^~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:7: note: Taking true branch
1516 | if(!addr)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:8: note: 'rc' is 0
1523 | if(rc) {
| ^~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:5: note: Taking false branch
1523 | if(rc) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:6: note: Assuming 'server_connectport' is not equal to 0
1545 | if(server_connectport)
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:3: note: Taking true branch
1545 | if(server_connectport)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:6: note: Assuming 'wrotepidfile' is not equal to 0
1553 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:3: note: Taking false branch
1553 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:6: note: Assuming 'portname' is null
1557 | if(portname) {
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:3: note: Taking false branch
1557 | if(portname) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1566:20: note: Calling 'juggle'
1566 | juggle_again = juggle(&msgsock, sock, &mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:942:3: note: 'buffer' initialized here
942 | unsigned char buffer[BUFFER_SIZE];
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:6: note: Assuming 'got_exit_signal' is 0
945 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:3: note: Taking false branch
945 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:6: note: Assuming the condition is false
953 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:3: note: Taking false branch
953 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:975:3: note: Control jumps to 'case ACTIVE:' at line 1015
975 | switch(*mode) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1019:5: note: Taking true branch
1019 | if(CURL_SOCKET_BAD != sockfd) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1034:5: note: Execution continues on line 1050
1034 | break;
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:8: note: Assuming 'got_exit_signal' is 0
1052 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:5: note: Taking false branch
1052 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:12: note: Assuming the condition is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:22: note: Left side of '&&' is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1046:3: note: Loop condition is false. Exiting loop
1046 | do {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:6: note: Assuming 'rc' is >= 0
1059 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:3: note: Taking false branch
1059 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:6: note: Assuming 'rc' is not equal to 0
1065 | if(rc == 0)
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:3: note: Taking false branch
1065 | if(rc == 0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:6: note: Assuming the condition is true
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:3: note: Taking true branch
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1087:5: note: Taking false branch
1087 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:8: note: Assuming the condition is false
1093 | if(!memcmp("PING", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:5: note: Taking false branch
1093 | if(!memcmp("PING", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:13: note: Assuming the condition is false
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:10: note: Taking false branch
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:13: note: Assuming the condition is false
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:10: note: Taking false branch
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:13: note: Assuming the condition is true
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:10: note: Taking true branch
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Calling 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:375:3: note: Taking false branch
375 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:380:3: note: Value assigned to 'buffer_len'
380 | *buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:6: note: Assuming the condition is false
381 | if(*buffer_len > maxlen) {
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:3: note: Taking false branch
381 | if(*buffer_len > maxlen) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Calling 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:6: note: Assuming 'nread' is equal to 'nbytes'
292 | if(nread != (ssize_t)nbytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:3: note: Taking false branch
292 | if(nread != (ssize_t)nbytes) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Returning from 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:3: note: Taking false branch
388 | if(!read_stdin(buffer, *buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Returning from 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:7: note: Taking false branch
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1121:7: note: Taking false branch
1121 | if(*mode == PASSIVE_LISTEN) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: note: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615)
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
185 | (SEND_QUAL_ARG2 SEND_TYPE_ARG2)CURL_UNCONST(y), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186 | (SEND_TYPE_ARG3)(z), \
| ~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: note: The bzero() function is obsoleted by memset()
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: note: The bzero() function is obsoleted by memset()
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: note: The bzero() function is obsoleted by memset()
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: note: The bzero() function is obsoleted by memset()
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: note: The bzero() function is obsoleted by memset()
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: note: The bzero() function is obsoleted by memset()
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: note: The bzero() function is obsoleted by memset()
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: note: The bzero() function is obsoleted by memset()
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: note: The bzero() function is obsoleted by memset()
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: note: The bzero() function is obsoleted by memset()
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
FAILED: [code=1] tests/server/CMakeFiles/servers-clang-tidy
```
https://github.com/curl/curl/actions/runs/15808305692/job/44556157538?pr=17705#step:14:317
```
/Users/runner/work/curl/curl/tests/server/mqttd.c:674:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
674 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:674:5: note: The bzero() function is obsoleted by memset()
674 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:675:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
675 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:675:5: note: The bzero() function is obsoleted by memset()
675 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:676:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
676 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/mqttd.c:676:5: note: The bzero() function is obsoleted by memset()
676 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:962:3: note: The bzero() function is obsoleted by memset()
962 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:963:3: note: The bzero() function is obsoleted by memset()
963 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:964:3: note: The bzero() function is obsoleted by memset()
964 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615) [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:9: note: Assuming 'argc' is <= 'arg'
1368 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:3: note: Loop condition is false. Execution continues on line 1473
1368 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1473:3: note: Loop condition is false. Exiting loop
1473 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1474:3: note: Loop condition is false. Exiting loop
1474 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1475:3: note: Loop condition is false. Exiting loop
1475 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:6: note: Assuming 'use_ipv6' is true
1480 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:3: note: Taking false branch
1480 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1488:3: note: Taking false branch
1488 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:6: note: Assuming 'server_connectport' is not equal to 0
1495 | if(server_connectport) {
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:3: note: Taking true branch
1495 | if(server_connectport) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:8: note: Assuming 'use_ipv6' is true
1499 | if(!use_ipv6) {
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:5: note: Taking false branch
1499 | if(!use_ipv6) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1515:26: note: '?' condition is false
1515 | me.sa6.sin6_port = htons(server_connectport);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_endian.h:134:25: note: expanded from macro 'htons'
134 | #define htons(x) __DARWIN_OSSwapInt16(x)
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/libkern/_OSByteOrder.h:85:19: note: expanded from macro '__DARWIN_OSSwapInt16'
85 | ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:11: note: 'addr' is null
1516 | if(!addr)
| ^~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:7: note: Taking true branch
1516 | if(!addr)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:8: note: 'rc' is 0
1523 | if(rc) {
| ^~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:5: note: Taking false branch
1523 | if(rc) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:6: note: Assuming 'server_connectport' is not equal to 0
1545 | if(server_connectport)
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:3: note: Taking true branch
1545 | if(server_connectport)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:6: note: Assuming 'wrotepidfile' is not equal to 0
1553 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:3: note: Taking false branch
1553 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:6: note: Assuming 'portname' is null
1557 | if(portname) {
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:3: note: Taking false branch
1557 | if(portname) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1566:20: note: Calling 'juggle'
1566 | juggle_again = juggle(&msgsock, sock, &mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:942:3: note: 'buffer' initialized here
942 | unsigned char buffer[BUFFER_SIZE];
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:6: note: Assuming 'got_exit_signal' is 0
945 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:3: note: Taking false branch
945 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:6: note: Assuming the condition is false
953 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:3: note: Taking false branch
953 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:975:3: note: Control jumps to 'case ACTIVE:' at line 1015
975 | switch(*mode) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1019:5: note: Taking true branch
1019 | if(CURL_SOCKET_BAD != sockfd) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1034:5: note: Execution continues on line 1050
1034 | break;
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:8: note: Assuming 'got_exit_signal' is 0
1052 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:5: note: Taking false branch
1052 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:12: note: Assuming the condition is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:22: note: Left side of '&&' is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1046:3: note: Loop condition is false. Exiting loop
1046 | do {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:6: note: Assuming 'rc' is >= 0
1059 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:3: note: Taking false branch
1059 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:6: note: Assuming 'rc' is not equal to 0
1065 | if(rc == 0)
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:3: note: Taking false branch
1065 | if(rc == 0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:6: note: Assuming the condition is true
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:3: note: Taking true branch
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1087:5: note: Taking false branch
1087 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:8: note: Assuming the condition is false
1093 | if(!memcmp("PING", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:5: note: Taking false branch
1093 | if(!memcmp("PING", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:13: note: Assuming the condition is false
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:10: note: Taking false branch
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:13: note: Assuming the condition is false
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:10: note: Taking false branch
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:13: note: Assuming the condition is true
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:10: note: Taking true branch
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Calling 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:375:3: note: Taking false branch
375 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:380:3: note: Value assigned to 'buffer_len'
380 | *buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:6: note: Assuming the condition is false
381 | if(*buffer_len > maxlen) {
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:3: note: Taking false branch
381 | if(*buffer_len > maxlen) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Calling 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:6: note: Assuming 'nread' is equal to 'nbytes'
292 | if(nread != (ssize_t)nbytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:3: note: Taking false branch
292 | if(nread != (ssize_t)nbytes) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Returning from 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:3: note: Taking false branch
388 | if(!read_stdin(buffer, *buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Returning from 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:7: note: Taking false branch
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1121:7: note: Taking false branch
1121 | if(*mode == PASSIVE_LISTEN) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: note: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615)
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
185 | (SEND_QUAL_ARG2 SEND_TYPE_ARG2)CURL_UNCONST(y), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186 | (SEND_TYPE_ARG3)(z), \
| ~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:627:5: note: The bzero() function is obsoleted by memset()
627 | FD_ZERO(&fds_read);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:628:5: note: The bzero() function is obsoleted by memset()
628 | FD_ZERO(&fds_write);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/socksd.c:629:5: note: The bzero() function is obsoleted by memset()
629 | FD_ZERO(&fds_err);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:833:11: note: The bzero() function is obsoleted by memset()
833 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:834:11: note: The bzero() function is obsoleted by memset()
834 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1311:7: note: The bzero() function is obsoleted by memset()
1311 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1434:5: note: The bzero() function is obsoleted by memset()
1434 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:1435:5: note: The bzero() function is obsoleted by memset()
1435 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2322:5: note: The bzero() function is obsoleted by memset()
2322 | FD_ZERO(&input);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: error: The bzero() function is obsoleted by memset() [clang-analyzer-security.insecureAPI.bzero,-warnings-as-errors]
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sws.c:2323:5: note: The bzero() function is obsoleted by memset()
2323 | FD_ZERO(&output);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_zero.h:29:25: note: expanded from macro 'FD_ZERO'
29 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
| ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:115:33: note: expanded from macro '__DARWIN_FD_ZERO'
115 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
| ^~~~~~~~~~~~~~~
FAILED: [code=1] tests/server/CMakeFiles/servers-clang-tidy
```
https://github.com/curl/curl/actions/runs/15808374641/job/44556350632?pr=17705#step:14:317
Previous method broke the tests: https://github.com/curl/curl/actions/runs/15808374638/job/44556319239?pr=17705
```
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615) [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:9: note: Assuming 'argc' is <= 'arg'
1368 | while(argc > arg) {
| ^~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1368:3: note: Loop condition is false. Execution continues on line 1473
1368 | while(argc > arg) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1473:3: note: Loop condition is false. Exiting loop
1473 | CURLX_SET_BINMODE(stdin);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1474:3: note: Loop condition is false. Exiting loop
1474 | CURLX_SET_BINMODE(stdout);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1475:3: note: Loop condition is false. Exiting loop
1475 | CURLX_SET_BINMODE(stderr);
| ^
/Users/runner/work/curl/curl/lib/curlx/binmode.h:36:52: note: expanded from macro 'CURLX_SET_BINMODE'
36 | # define CURLX_SET_BINMODE(stream) (void)stream; Curl_nop_stmt
| ^
/Users/runner/work/curl/curl/lib/curl_setup.h:856:23: note: expanded from macro 'Curl_nop_stmt'
856 | #define Curl_nop_stmt do { } while(0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:6: note: Assuming 'use_ipv6' is true
1480 | if(!use_ipv6)
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1480:3: note: Taking false branch
1480 | if(!use_ipv6)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1488:3: note: Taking false branch
1488 | if(CURL_SOCKET_BAD == sock) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:6: note: Assuming 'server_connectport' is not equal to 0
1495 | if(server_connectport) {
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1495:3: note: Taking true branch
1495 | if(server_connectport) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:8: note: Assuming 'use_ipv6' is true
1499 | if(!use_ipv6) {
| ^~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1499:5: note: Taking false branch
1499 | if(!use_ipv6) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1515:26: note: '?' condition is false
1515 | me.sa6.sin6_port = htons(server_connectport);
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_endian.h:134:25: note: expanded from macro 'htons'
134 | #define htons(x) __DARWIN_OSSwapInt16(x)
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/libkern/_OSByteOrder.h:85:19: note: expanded from macro '__DARWIN_OSSwapInt16'
85 | ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:11: note: 'addr' is null
1516 | if(!addr)
| ^~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1516:7: note: Taking true branch
1516 | if(!addr)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:8: note: 'rc' is 0
1523 | if(rc) {
| ^~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1523:5: note: Taking false branch
1523 | if(rc) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:6: note: Assuming 'server_connectport' is not equal to 0
1545 | if(server_connectport)
| ^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1545:3: note: Taking true branch
1545 | if(server_connectport)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:6: note: Assuming 'wrotepidfile' is not equal to 0
1553 | if(!wrotepidfile) {
| ^~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1553:3: note: Taking false branch
1553 | if(!wrotepidfile) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:6: note: Assuming 'portname' is null
1557 | if(portname) {
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1557:3: note: Taking false branch
1557 | if(portname) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1566:20: note: Calling 'juggle'
1566 | juggle_again = juggle(&msgsock, sock, &mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:942:3: note: 'buffer' initialized here
942 | unsigned char buffer[BUFFER_SIZE];
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:6: note: Assuming 'got_exit_signal' is 0
945 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:945:3: note: Taking false branch
945 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:6: note: Assuming the condition is false
953 | if(getppid() <= 1) {
| ^~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:953:3: note: Taking false branch
953 | if(getppid() <= 1) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:975:3: note: Control jumps to 'case ACTIVE:' at line 1015
975 | switch(*mode) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1019:5: note: Taking true branch
1019 | if(CURL_SOCKET_BAD != sockfd) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1034:5: note: Execution continues on line 1050
1034 | break;
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:8: note: Assuming 'got_exit_signal' is 0
1052 | if(got_exit_signal) {
| ^~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1052:5: note: Taking false branch
1052 | if(got_exit_signal) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:12: note: Assuming the condition is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1057:22: note: Left side of '&&' is false
1057 | } while((rc == -1) && ((error = SOCKERRNO) == SOCKEINTR));
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1046:3: note: Loop condition is false. Exiting loop
1046 | do {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:6: note: Assuming 'rc' is >= 0
1059 | if(rc < 0) {
| ^~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1059:3: note: Taking false branch
1059 | if(rc < 0) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:6: note: Assuming 'rc' is not equal to 0
1065 | if(rc == 0)
| ^~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1065:3: note: Taking false branch
1065 | if(rc == 0)
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:6: note: Assuming the condition is true
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_isset.h:29:25: note: expanded from macro 'FD_ISSET'
29 | #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
| ^~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_fd_def.h:108:33: note: expanded from macro '__DARWIN_FD_ISSET'
108 | #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1070:3: note: Taking true branch
1070 | if(FD_ISSET(fileno(stdin), &fds_read)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1087:5: note: Taking false branch
1087 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:8: note: Assuming the condition is false
1093 | if(!memcmp("PING", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1093:5: note: Taking false branch
1093 | if(!memcmp("PING", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:13: note: Assuming the condition is false
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1099:10: note: Taking false branch
1099 | else if(!memcmp("PORT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:13: note: Assuming the condition is false
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1111:10: note: Taking false branch
1111 | else if(!memcmp("QUIT", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:13: note: Assuming the condition is true
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1116:10: note: Taking true branch
1116 | else if(!memcmp("DATA", buffer, 4)) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Calling 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:375:3: note: Taking false branch
375 | if(!read_stdin(buffer, 5))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:380:3: note: Value assigned to 'buffer_len'
380 | *buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:6: note: Assuming the condition is false
381 | if(*buffer_len > maxlen) {
| ^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:381:3: note: Taking false branch
381 | if(*buffer_len > maxlen) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Calling 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:6: note: Assuming 'nread' is equal to 'nbytes'
292 | if(nread != (ssize_t)nbytes) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:292:3: note: Taking false branch
292 | if(nread != (ssize_t)nbytes) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:7: note: Returning from 'read_stdin'
388 | if(!read_stdin(buffer, *buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:388:3: note: Taking false branch
388 | if(!read_stdin(buffer, *buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:11: note: Returning from 'read_data_block'
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1118:7: note: Taking false branch
1118 | if(!read_data_block(buffer, sizeof(buffer), &buffer_len))
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1121:7: note: Taking false branch
1121 | if(*mode == PASSIVE_LISTEN) {
| ^
/Users/runner/work/curl/curl/tests/server/sockfilt.c:1128:33: note: The 2nd argument to 'send' is a buffer with size 17010 but should be a buffer with size equal to or greater than the value of the 3rd argument (which is 18446744073709551615)
1128 | ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
| ^
/Users/runner/work/curl/curl/lib/curl_setup_once.h:184:32: note: expanded from macro 'swrite'
184 | #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
| ^
185 | (SEND_QUAL_ARG2 SEND_TYPE_ARG2)CURL_UNCONST(y), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186 | (SEND_TYPE_ARG3)(z), \
| ~~~~~~~~~~~~~~~~~~~
```
https://github.com/curl/curl/actions/runs/15808780761/job/44557270318?pr=17705
ef264aa to
67b6fcf
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace existing
mk-unity.pl--embedworkaround with runningclang-tidymanually on individual test source instead. This alignswith how clang-tidy works and removes
mk-unity.plfrom the solution.Also:
bzero()warnings that happensinside the notorious
FD_ZERO()macros, on macOS.Ref: #17680 (comment)
The manual clang-tidy solution had two ugly workarounds → [REPLACED WITH CODE]:
UNITTESTSmacro manually for units, tunits forclang-tidy, because I couldn't extract this from CMake, where it's
inheriting it from the libcurlu, libcurltool libraries. Perhaps
there is a way to automate this more.
lib1521.c. Similar trick is already used for src in
./configure.