Skip to content

Conversation

@andy-bower
Copy link
Contributor

Fixes a problem showing up in Ubuntu Resolute Raccoon package builds on some architectures, such as amd64, when int types are passed in:

In function ‘cinit’,
    inlined from ‘main’ at main.c:138:6:
curl.c:69:13: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   69 |         if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, options.verbose)) {
      |             ^
curl.c:77:13: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   77 |         if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, options.verify)) {
      |             ^
curl.c:91:21: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   91 |                 if (curl_easy_setopt(*hdl, CURLOPT_NETRC, options.netrc)) {
      |                     ^
lto1: all warnings being treated as errors

https://launchpadlibrarian.net/833438792/buildlog_ubuntu-resolute-amd64.mcds_1.9-4_BUILDING.txt.gz

The warning seems to be correct, based on the man page. This error could cause incorrect behaviour and may have been the cause of instability in the Debian autopkgtest .netrc authentication test, which occasionally failed inexplicably.

I didn't work out how to trigger this warning in a standalone build or on Debian but did reproduce building the package in an Ubuntu development VM and tested the fix there.

Fixes a problem showing up in Ubuntu Resolute Raccoon
package builds on some architectures, such as amd64,
when int types are passed in:

In function ‘cinit’,
    inlined from ‘main’ at main.c:138:6:
curl.c:69:13: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   69 |         if (curl_easy_setopt(*hdl, CURLOPT_VERBOSE, options.verbose)) {
      |             ^
curl.c:77:13: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   77 |         if (curl_easy_setopt(*hdl, CURLOPT_SSL_VERIFYPEER, options.verify)) {
      |             ^
curl.c:91:21: error: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
   91 |                 if (curl_easy_setopt(*hdl, CURLOPT_NETRC, options.netrc)) {
      |                     ^
lto1: all warnings being treated as errors

<https://launchpadlibrarian.net/833438792/buildlog_ubuntu-resolute-amd64.mcds_1.9-4_BUILDING.txt.gz>
Copy link
Owner

@t-brown t-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@t-brown t-brown merged commit ff7d1da into t-brown:master Dec 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants