curl/lib
Viktor Szakats d0728c9109
lib: fix compiler warnings (gcc)
Seen when setting `ENABLE_DEBUG=ON` and `-DDEBUGBUILD` for mingw-w64
gcc 13.2.0 CMake unity builds in 'Release' configurations.

```
curl/lib/curl_gethostname.c:71:5: error: 'strncpy' specified bound 1025 equals destination size [-Werror=stringop-truncation]
   71 |     strncpy(name, force_hostname, namelen);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:175:
In function 'hostcache_timestamp_remove',
    inlined from 'Curl_hash_clean_with_criterium' at curl/lib/hash.c:265:19,
    inlined from 'Curl_hash_clean_with_criterium' at curl/lib/hash.c:247:1,
    inlined from 'hostcache_prune' at curl/lib/hostip.c:228:3,
    inlined from 'Curl_hostcache_prune' at curl/lib/hostip.c:256:21:
curl/lib/hostip.c:205:12: error: 'now' may be used uninitialized [-Werror=maybe-uninitialized]
  205 |     time_t age = prune->now - c->timestamp;
      |            ^~~
curl/lib/hostip.c: In function 'Curl_hostcache_prune':
curl/lib/hostip.c:241:10: note: 'now' was declared here
  241 |   time_t now;
      |          ^~~
In function 'hostcache_timestamp_remove',
    inlined from 'fetch_addr' at curl/lib/hostip.c:310:8:
curl/lib/hostip.c:205:23: error: 'user.now' may be used uninitialized [-Werror=maybe-uninitialized]
  205 |     time_t age = prune->now - c->timestamp;
      |                  ~~~~~^~~~~
curl/lib/hostip.c: In function 'fetch_addr':
curl/lib/hostip.c:304:33: note: 'user' declared here
  304 |     struct hostcache_prune_data user;
      |                                 ^~~~
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:40:
curl/lib/cf-socket.c: In function 'cf_socket_send':
curl/lib/cf-socket.c:1294:10: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
 1294 |     if(c >= ((100-ctx->wblock_percent)*256/100)) {
      |        ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curl/lib/cf-socket.c:1292:19: note: 'c' was declared here
 1292 |     unsigned char c;
      |                   ^
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:364:
In function 'tftp_state_timeout',
    inlined from 'tftp_multi_statemach' at curl/lib/tftp.c:1230:27:
curl/lib/tftp.c:1208:5: error: 'current' may be used uninitialized [-Werror=maybe-uninitialized]
 1208 |   if(current > state->rx_time + state->retry_time) {
      |     ^
curl/lib/tftp.c: In function 'tftp_multi_statemach':
curl/lib/tftp.c:1192:10: note: 'current' was declared here
 1192 |   time_t current;
      |          ^~~~~~~
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49792835/job/91c8dj5qb36spfe0#L112
Ref: https://github.com/curl/curl/actions/runs/9082968838/job/24960616145#step:12:62

Ref: #13592
Closes #13643
2024-05-17 12:00:19 +02:00
..
vauth vauth: make two functions void that always just returned OK 2024-05-13 22:38:25 +02:00
vquic vquic-tls: use correct cert name check API for wolfSSL 2024-05-16 22:44:29 +02:00
vssh libssh2: delete redundant feature guard 2024-05-05 16:34:41 +02:00
vtls rustls: fix partial send handling 2024-05-16 23:01:15 +02:00
.checksrc
.gitattributes
.gitignore
altsvc.c lib: merge ENABLE_QUIC C macro into USE_HTTP3 2024-04-13 08:33:27 +00:00
altsvc.h
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
asyn-thread.c asyn-thread: fix curl_global_cleanup crash in Windows 2024-05-07 14:54:11 -04:00
asyn.h
base64.c lib: silence -Wsign-conversion in base64, strcase, mprintf 2024-04-24 23:29:30 +02:00
bufq.c
bufq.h bufq: remove duplicate word in comment 2024-05-08 19:12:03 +02:00
bufref.c
bufref.h
c-hyper.c lib: add Curl_xfer_write_resp_hd 2024-04-11 09:29:21 +02:00
c-hyper.h
cf-h1-proxy.c lib/cf-h1-proxy: silence compiler warnings (gcc 14) 2024-05-08 12:37:33 +02:00
cf-h1-proxy.h
cf-h2-proxy.c
cf-h2-proxy.h
cf-haproxy.c
cf-haproxy.h
cf-https-connect.c cf-https-connect: use timeouts as unsigned ints 2024-04-30 11:23:20 +02:00
cf-https-connect.h
cf-socket.c lib: fix compiler warnings (gcc) 2024-05-17 12:00:19 +02:00
cf-socket.h
cfilters.c http/2, http/3: decouple stream state from easy handle 2024-04-17 14:24:09 +02:00
cfilters.h http/2, http/3: decouple stream state from easy handle 2024-04-17 14:24:09 +02:00
CMakeLists.txt dllmain: Call OpenSSL thread cleanup for Windows and Cygwin 2024-04-24 04:04:25 -04:00
config-amigaos.h
config-dos.h
config-mac.h
config-os400.h lib: merge ENABLE_QUIC C macro into USE_HTTP3 2024-04-13 08:33:27 +00:00
config-plan9.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
config-riscos.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
config-win32.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
config-win32ce.h
conncache.c lib: bump hash sizes to size_t 2024-05-12 18:53:09 +02:00
conncache.h lib: bump hash sizes to size_t 2024-05-12 18:53:09 +02:00
connect.c lib: merge ENABLE_QUIC C macro into USE_HTTP3 2024-04-13 08:33:27 +00:00
connect.h
content_encoding.c content_encoding: ignore duplicate chunked encoding 2024-04-25 17:50:16 +02:00
content_encoding.h
cookie.c lib: silence warnings on comma misuse 2024-04-17 14:26:35 +02:00
cookie.h
curl_addrinfo.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
curl_addrinfo.h
curl_base64.h
curl_config.h.cmake curl_setup.h: detect 'inline' support 2024-04-25 22:38:00 +02:00
curl_ctype.h
curl_des.c
curl_des.h
curl_endian.c
curl_endian.h
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c
curl_get_line.h
curl_gethostname.c lib: fix compiler warnings (gcc) 2024-05-17 12:00:19 +02:00
curl_gethostname.h
curl_gssapi.c
curl_gssapi.h
curl_hmac.h
curl_krb5.h
curl_ldap.h
curl_md4.h
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c curl_multibyte: remove access() function wrapper for Windows 2024-05-07 02:28:10 -04:00
curl_multibyte.h
curl_ntlm_core.c
curl_ntlm_core.h
curl_path.c curl_path: make Curl_get_pathname use dynbuf 2024-05-08 10:10:12 +02:00
curl_path.h curl_path: make Curl_get_pathname use dynbuf 2024-05-08 10:10:12 +02:00
curl_printf.h
curl_range.c
curl_range.h
curl_rtmp.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
curl_rtmp.h curl_version_info: provide librtmp version 2024-04-15 16:48:34 +02:00
curl_sasl.c vauth: make two functions void that always just returned OK 2024-05-13 22:38:25 +02:00
curl_sasl.h
curl_setup_once.h
curl_setup.h curl_multibyte: remove access() function wrapper for Windows 2024-05-07 02:28:10 -04:00
curl_sha256.h
curl_sha512_256.c curl_setup.h: detect 'inline' support 2024-04-25 22:38:00 +02:00
curl_sha512_256.h
curl_sspi.c
curl_sspi.h
curl_threads.c asyn-thread: fix curl_global_cleanup crash in Windows 2024-05-07 14:54:11 -04:00
curl_threads.h
curl_trc.c ftp: add tracing support 2024-05-10 23:39:48 +02:00
curl_trc.h ftp: add tracing support 2024-05-10 23:39:48 +02:00
curlx.h
cw-out.c cw-out: improved error handling 2024-04-16 15:52:10 +02:00
cw-out.h cw-out: improved error handling 2024-04-16 15:52:10 +02:00
dict.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
dict.h
dllmain.c dllmain: Call OpenSSL thread cleanup for Windows and Cygwin 2024-04-24 04:04:25 -04:00
doh.c doh: cleanups in ECH related functions 2024-05-06 09:09:51 +02:00
doh.h doh: Remove unused function prototype 2024-05-06 09:50:37 +02:00
dynbuf.c dynbuf: Fix returncode on memory error 2024-05-04 11:44:27 +02:00
dynbuf.h
dynhds.c
dynhds.h
easy_lock.h
easy.c lib: clear the easy handle's saved errno before transfer 2024-05-10 18:26:32 -04:00
easygetopt.c
easyif.h
easyoptions.c TLS: add support for ECH (Encrypted Client Hello) 2024-04-16 08:10:53 +02:00
easyoptions.h
escape.c
escape.h
file.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
file.h
fileinfo.c
fileinfo.h
fopen.c
fopen.h
formdata.c
formdata.h
ftp.c ftp: fix build for CURL_DISABLE_VERBOSE_STRINGS 2024-05-10 19:14:29 -04:00
ftp.h
ftplistparser.c
ftplistparser.h
functypes.h
getenv.c
getinfo.c
getinfo.h
gopher.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
gopher.h
hash.c hash: change 'slots' to size_t from int 2024-04-30 10:23:32 +02:00
hash.h hash: change 'slots' to size_t from int 2024-04-30 10:23:32 +02:00
headers.c misc: fix typos, quoting and spelling 2024-05-06 10:35:53 +02:00
headers.h
hmac.c
hostasyn.c
hostip4.c
hostip6.c
hostip.c lib: fix compiler warnings (gcc) 2024-05-17 12:00:19 +02:00
hostip.h lib: bump hash sizes to size_t 2024-05-12 18:53:09 +02:00
hostsyn.c
hsts.c hsts: explicitly skip blank lines 2024-05-14 10:19:41 +02:00
hsts.h
http1.c
http1.h
http2.c http2 + ngtcp2: pass CURLcode errors from callbacks 2024-04-19 23:45:16 +02:00
http2.h
http_aws_sigv4.c http_aws_sigv4: remove useless assignment 2024-04-19 23:46:54 +02:00
http_aws_sigv4.h
http_chunks.c
http_chunks.h
http_digest.c
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http_proxy.c
http_proxy.h
http.c http: remove redundant check 2024-05-10 23:37:09 +02:00
http.h http/2, http/3: decouple stream state from easy handle 2024-04-17 14:24:09 +02:00
idn.c idn: add native AppleIDN (icucore) support for macOS/iOS 2024-04-17 00:24:09 +02:00
idn.h idn: add native AppleIDN (icucore) support for macOS/iOS 2024-04-17 00:24:09 +02:00
if2ip.c if2ip: make the buf_size arg a size_t 2024-04-30 14:22:11 +02:00
if2ip.h if2ip: make the buf_size arg a size_t 2024-04-30 14:22:11 +02:00
imap.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
imap.h
inet_ntop.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
inet_ntop.h
inet_pton.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
inet_pton.h
krb5.c krb5: use dynbuf 2024-05-09 10:59:13 +02:00
ldap.c ldap: fix unused variables (seen on OmniOS) 2024-05-10 23:11:55 +02:00
libcurl.rc
libcurl.vers.in
llist.c
llist.h
macos.c
macos.h
Makefile.am
Makefile.inc mbedTLS: implement CURLOPT_SSL_CIPHER_LIST option 2024-04-24 14:30:37 +02:00
Makefile.mk build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
Makefile.soname
md4.c mbedtls: fix building with v3 in CMake Unity mode 2024-04-16 09:36:43 +02:00
md5.c
memdebug.c
memdebug.h
mime.c lib: remove two instances of "only only" messages 2024-05-08 00:03:38 +02:00
mime.h
mprintf.c lib: silence -Wsign-conversion in base64, strcase, mprintf 2024-04-24 23:29:30 +02:00
mqtt.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
mqtt.h
multi.c lib: bump hash sizes to size_t 2024-05-12 18:53:09 +02:00
multihandle.h wakeup_create: use FD_CLOEXEC/SOCK_CLOEXEC 2024-05-16 23:02:12 +02:00
multiif.h lib: bump hash sizes to size_t 2024-05-12 18:53:09 +02:00
netrc.c
netrc.h
nonblock.c
nonblock.h
noproxy.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
noproxy.h
openldap.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
optiontable.pl
parsedate.c
parsedate.h
pingpong.c
pingpong.h
pop3.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
pop3.h lib: add Curl_xfer_write_resp_hd 2024-04-11 09:29:21 +02:00
progress.c
progress.h
psl.c
psl.h
rand.c
rand.h
rename.c
rename.h
request.c request: make Curl_req_init return void 2024-04-19 23:42:33 +02:00
request.h request: make Curl_req_init return void 2024-04-19 23:42:33 +02:00
rtsp.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
rtsp.h lib: add Curl_xfer_write_resp_hd 2024-04-11 09:29:21 +02:00
select.c
select.h
sendf.c lib: remove two instances of "only only" messages 2024-05-08 00:03:38 +02:00
sendf.h sendf: fix two typos in comments 2024-04-17 14:28:24 +02:00
setopt.c setopt: acknowledge errors proper for CURLOPT_COOKIEJAR 2024-05-14 07:59:43 +02:00
setopt.h setopt: warn on Curl_set*opt() uses not using the return value 2024-05-12 17:27:51 +02:00
setup-os400.h
setup-vms.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
setup-win32.h
sha256.c
share.c
share.h
sigpipe.h
slist.c
slist.h
smb.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
smb.h
smtp.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
smtp.h
sockaddr.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
socketpair.c wakeup_create: use FD_CLOEXEC/SOCK_CLOEXEC 2024-05-16 23:02:12 +02:00
socketpair.h wakeup_create: use FD_CLOEXEC/SOCK_CLOEXEC 2024-05-16 23:02:12 +02:00
socks_gssapi.c
socks_sspi.c
socks.c build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
socks.h
speedcheck.c
speedcheck.h
splay.c
splay.h
strcase.c lib: silence -Wsign-conversion in base64, strcase, mprintf 2024-04-24 23:29:30 +02:00
strcase.h
strdup.c
strdup.h
strerror.c TLS: add support for ECH (Encrypted Client Hello) 2024-04-16 08:10:53 +02:00
strerror.h
strtok.c
strtok.h
strtoofft.c
strtoofft.h
system_win32.c
system_win32.h
telnet.c lib: make protocol handlers store scheme name lowercase 2024-05-08 09:39:30 +02:00
telnet.h
tftp.c lib: fix compiler warnings (gcc) 2024-05-17 12:00:19 +02:00
tftp.h
timediff.c
timediff.h
timeval.c
timeval.h
transfer.c transfer: remove useless assignment 2024-04-21 10:50:37 +02:00
transfer.h lib: add Curl_xfer_write_resp_hd 2024-04-11 09:29:21 +02:00
url.c url: make parse_login_details use memdup0 2024-05-10 22:53:12 +02:00
url.h
urlapi-int.h urlapi: remove unused flags argument from Curl_url_set_authority 2024-04-18 22:24:33 +02:00
urlapi.c lib: call Curl_strntolower instead of doing crafted loops 2024-05-14 08:00:19 +02:00
urldata.h krb5: use dynbuf 2024-05-09 10:59:13 +02:00
version_win32.c
version_win32.h
version.c version: use msnprintf instead of strncpy 2024-05-08 10:40:58 +02:00
warnless.c
warnless.h warnless: delete orphan declarations 2024-05-14 16:37:11 +02:00
ws.c websocket: Avoid memory leak in error path 2024-05-13 09:11:23 +02:00
ws.h