curl/src
Viktor Szakats 72f0607488
tests: fix compiler warnings
Seen with llvm 17 on Windows x64.

```
.../curl/tests/server/rtspd.c:136:13: warning: no previous extern declaration for non-static variable 'logdir' [-Wmissing-variable-declarations]
  136 | const char *logdir = "log";
      |             ^
.../curl/tests/server/rtspd.c:136:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit
  136 | const char *logdir = "log";
      |       ^
.../curl/tests/server/rtspd.c:137:6: warning: no previous extern declaration for non-static variable 'loglockfile' [-Wmissing-variable-declarations]
  137 | char loglockfile[256];
      |      ^
.../curl/tests/server/rtspd.c:137:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit
  137 | char loglockfile[256];
      | ^
.../curl/tests/server/fake_ntlm.c:43:13: warning: no previous extern declaration for non-static variable 'logdir' [-Wmissing-variable-declarations]
   43 | const char *logdir = "log";
      |             ^
.../curl/tests/server/fake_ntlm.c:43:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit
   43 | const char *logdir = "log";
      |       ^
.../curl/src/tool_doswin.c:350:8: warning: possible misuse of comma operator here [-Wcomma]
  350 |     ++d, ++s;
      |        ^
.../curl/src/tool_doswin.c:350:5: note: cast expression to void to silence warning
  350 |     ++d, ++s;
      |     ^~~
      |     (void)( )
```

```
.../curl/tests/libtest/lib540.c:146:27: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare]
  146 |         int itimeout = (L > (long)INT_MAX) ? INT_MAX : (int)L;
      |                         ~ ^ ~~~~~~~~~~~~~
1 warning generated.

.../curl/tests/libtest/libntlmconnect.c:195:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare]
  195 |       int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
      |                       ~~~~~~~ ^ ~~~~~~~~~~~~~
1 warning generated.

.../curl/tests/libtest/lib591.c:117:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare]
  117 |       int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
      |                       ~~~~~~~ ^ ~~~~~~~~~~~~~
1 warning generated.
.../curl/tests/libtest/lib597.c:99:31: warning: result of comparison 'long' > 2147483647 is always false [-Wtautological-type-limit-compare]
   99 |       int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
      |                       ~~~~~~~ ^ ~~~~~~~~~~~~~
1 warning generated.
```

Seen on macOS Intel:
```
.../curl/tests/server/sws.c:440:64: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
          msnprintf(logbuf, sizeof(logbuf), "Got request: %s %.*s HTTP/%d.%d",
                                                             ~~^~
1 warning generated.
```

Closes #11925
2023-09-24 21:52:54 +00:00
..
.gitignore copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt tool: add "variable" support 2023-07-31 11:51:34 +02:00
curl.rc copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am nss: remove support for this TLS library 2023-07-29 23:44:28 +02:00
Makefile.inc spelling: use 'reuse' not 're-use' in code and elsewhere 2023-08-23 23:22:36 +02:00
Makefile.mk copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mkhelp.pl src/mkhelp: strip off escape sequences 2023-07-23 23:30:51 +02:00
slist_wc.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
slist_wc.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_binmode.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_binmode.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_bname.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_bname.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_dbg.c tool: add curl command line option --trace-ids 2023-06-12 23:53:09 +02:00
tool_cb_dbg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_hdr.c tool: avoid including leading spaces in the Location hyperlink 2023-08-29 10:12:05 -07:00
tool_cb_hdr.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_prg.c tool: improve --stderr handling 2023-03-12 00:58:40 -05:00
tool_cb_prg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_rea.c curl: count uploaded data to stop at the originally given size 2023-06-01 13:43:28 +02:00
tool_cb_rea.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_see.c tool: fix tool_seek_cb build when SIZEOF_CURL_OFF_T > SIZEOF_OFF_T 2023-07-19 15:36:41 +02:00
tool_cb_see.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_wrt.c tool_cb_wrt: fix debug assertion 2023-09-13 14:00:05 -04:00
tool_cb_wrt.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cfgable.c curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_cfgable.h curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_dirhie.c tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_dirhie.h tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_doswin.c tests: fix compiler warnings 2023-09-24 21:52:54 +00:00
tool_doswin.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_easysrc.c tool: remove exclamation marks from error/warning messages 2023-06-01 08:19:21 +02:00
tool_easysrc.h tool_easysrc.h: correct easysrc_perform for CURL_DISABLE_LIBCURL_OPTION 2023-07-09 18:50:16 +02:00
tool_filetime.c tool_filetime: make -z work with file dates before 1970 2023-09-03 17:45:19 +02:00
tool_filetime.h tool_filetime: make -z work with file dates before 1970 2023-09-03 17:45:19 +02:00
tool_findfile.c cmake: add support for "unity" builds 2023-06-07 13:06:08 +00:00
tool_findfile.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_formparse.c tool: remove exclamation marks from error/warning messages 2023-06-01 08:19:21 +02:00
tool_formparse.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_getparam.c curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_getparam.h tool: add "variable" support 2023-07-31 11:51:34 +02:00
tool_getpass.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_getpass.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_help.c curl: output warning at --verbose output for debug-enabled version 2023-01-12 17:59:26 +01:00
tool_help.h curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_helpers.c tool: add "variable" support 2023-07-31 11:51:34 +02:00
tool_helpers.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_hugehelp.c.cvs copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_hugehelp.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_libinfo.c curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_libinfo.h curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_listhelp.c tool_listhelp: regenerated 2023-09-24 00:01:47 +02:00
tool_main.c nss: remove support for this TLS library 2023-07-29 23:44:28 +02:00
tool_main.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_msgs.c tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_msgs.h tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_operate.c curl: add support for the IPFS protocols: 2023-09-23 11:02:10 +02:00
tool_operate.h curl: count uploaded data to stop at the originally given size 2023-06-01 13:43:28 +02:00
tool_operhlp.c checksrc: disallow spaces before labels 2023-05-18 20:45:04 +02:00
tool_operhlp.h tool_operate: Fix error codes on bad URL & OOM 2023-02-07 08:20:04 +01:00
tool_paramhlp.c tool_paramhlp: improve str2num(): avoid unnecessary call to strlen() 2023-08-27 17:55:05 +02:00
tool_paramhlp.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_parsecfg.c tool_parsecfg: accept line lengths up to 10M 2023-07-13 15:16:41 +02:00
tool_parsecfg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_progress.c tool: improve --stderr handling 2023-03-12 00:58:40 -05:00
tool_progress.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_sdecls.h tool_cb_wrt: fix invalid unicode for windows console 2023-08-01 03:28:12 -04:00
tool_setopt.c tool: make the length argument an int for printf()-.* flags 2023-08-02 16:11:55 +02:00
tool_setopt.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_setup.h cmake: add support for "unity" builds 2023-06-07 13:06:08 +00:00
tool_sleep.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_sleep.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_stderr.c tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_stderr.h tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_strdup.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_strdup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_urlglob.c tool_urlglob: use the correct format specifier for curl_off_t in msnprintf 2023-08-20 23:14:50 +02:00
tool_urlglob.h tool_urlglob: use curl_off_t instead of longs 2023-05-31 08:14:41 +02:00
tool_util.c cmake: add support for "unity" builds 2023-06-07 13:06:08 +00:00
tool_util.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_version.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_vms.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_vms.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_writeout_json.c tool: add "variable" support 2023-07-31 11:51:34 +02:00
tool_writeout_json.h tool: add "variable" support 2023-07-31 11:51:34 +02:00
tool_writeout.c curl: make %output{} in -w specify a file to write to 2023-07-31 23:10:59 +02:00
tool_writeout.h lib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID 2023-06-12 23:53:00 +02:00
tool_xattr.c checksrc: disallow spaces before labels 2023-05-18 20:45:04 +02:00
tool_xattr.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
var.c tool: change some fopen failures from warnings to errors 2023-08-30 03:11:17 -04:00
var.h tidy-up: mostly whitespace nits 2023-08-31 23:02:10 +00:00