mirror of
https://github.com/curl/curl.git
synced 2024-12-03 06:20:31 +08:00
413a0fedd0
Do not alter the C standard when building with `--enable-warnings` when
building with gcc.
On one hand this alters warning results compared to a default build.
On the other, it may produce different binaries, which is unexpected.
Also fix new warnings that appeared after removing `-std=gnu89`:
- include: fix public curl headers to use the correct printf mask for
`CURL_FORMAT_CURL_OFF_T` and `CURL_FORMAT_CURL_OFF_TU` with mingw-w64
and Visual Studio 2013 and newer. This fixes the printf mask warnings
in examples and tests. E.g. [1]
- conncache: fix printf format string [2].
- http2: fix potential null pointer dereference [3].
(seen on Slackware with gcc 11.)
- libssh: fix printf format string in SFTP code [4].
Also make MSVC builds compatible with old CRT versions.
- libssh2: fix printf format string in SFTP code for MSVC.
Applying the same fix as for libssh above.
- unit1395: fix `argument is null` and related issues [5]:
- stop calling `strcmp()` with NULL to avoid undefined behaviour.
- fix checking results if some of them were NULL.
- do not pass NULL to printf `%s`.
- ci: keep a build job with `-std=gnu89` to continue testing for
C89-compliance. We can apply this to other gcc jobs as needed.
Ref:
|
||
---|---|---|
.. | ||
libssh2.c | ||
libssh.c | ||
ssh.h | ||
wolfssh.c |