examples: suppress deprecation warnings locally

Simplify making clean builds by silencing deprecation warnings inside
the example code where these may occur.

Drop related build tweaks/comments from GHA jobs.

Example warning:
```
curl/docs/examples/postit2-formadd.c:65:16: error: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Werror=deprecated-declarations]
   65 |                CURLFORM_COPYNAME, "sendfile",
      |                ^~~~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/9841099503/job/27166970904#step:10:829

Closes #14123
This commit is contained in:
Viktor Szakats 2024-07-08 16:02:21 +02:00
parent 72341068a2
commit 5fc61a37c1
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 20 additions and 6 deletions

View file

@ -210,7 +210,7 @@ jobs:
runs-on: 'macos-latest'
env:
CC: ${{ matrix.compiler.CC }}
CFLAGS: '-Wno-deprecated-declarations' # Required for LDAP and BUILD_EXAMPLES
CFLAGS: '-Wno-deprecated-declarations' # Required for LDAP
strategy:
fail-fast: false
matrix: