mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +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:
|
||
---|---|---|
.. | ||
curl | ||
Makefile.am | ||
README.md |
include
Public include files for libcurl, external users.
They're all placed in the curl subdirectory here for better fit in any kind of environment. You must include files from here using...
#include <curl/curl.h>
... style and point the compiler's include path to the directory holding the curl subdirectory. It makes it more likely to survive future modifications.
The public curl include files can be shared freely between different platforms and different architectures.