Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Azure DevOps shows GCC 10 compilation errors due to type mismatch between curl_off_t typeof and format #6079

@mback2k

Description

@mback2k

I did this

#5891 tried to fix this previously as I spotted this locally. Now that GCC 10 is also being used in the MSYS2 based Azure DevOps builds, we are bitten by this again in CI:

Logs taken from 32-bit and 64-bit builds of today's release:

2020-10-14T09:24:38.3859321Z tool_filetime.c: In function 'setfiletime':
2020-10-14T09:24:38.3860145Z tool_filetime.c:106:15: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:24:38.3860990Z   106 |               "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:24:38.3862159Z       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:24:38.3863740Z tool_filetime.c:106:15: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:24:38.3864867Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:24:38.3865679Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:24:38.3866111Z                  from tool_setup.h:36,
2020-10-14T09:24:38.3866514Z                  from tool_filetime.h:24,
2020-10-14T09:24:38.3866881Z                  from tool_filetime.c:22:
2020-10-14T09:24:38.3867258Z ../include/curl/system.h:199:42: note: format string is defined here
2020-10-14T09:24:38.3867656Z   199 | #  define CURL_FORMAT_CURL_OFF_T     "I64d"
2020-10-14T09:24:38.3868391Z tool_filetime.c:125:17: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:24:38.3868916Z   125 |                 "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:24:38.3869346Z       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:24:38.3870193Z tool_filetime.c:125:17: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:24:38.3870895Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:24:38.3871413Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:24:38.3871932Z                  from tool_setup.h:36,
2020-10-14T09:24:38.3872287Z                  from tool_filetime.h:24,
2020-10-14T09:24:38.3872668Z                  from tool_filetime.c:22:
2020-10-14T09:24:38.3873427Z ../include/curl/system.h:199:42: note: format string is defined here
2020-10-14T09:24:38.3873985Z   199 | #  define CURL_FORMAT_CURL_OFF_T     "I64d"
2020-10-14T09:24:38.3874407Z tool_filetime.c:133:15: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:24:38.3874846Z   133 |               "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:24:38.3875234Z       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:24:38.3875731Z tool_filetime.c:133:15: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:24:38.3876236Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:24:38.3876588Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:24:38.3876927Z                  from tool_setup.h:36,
2020-10-14T09:24:38.3877275Z                  from tool_filetime.h:24,
2020-10-14T09:24:38.3877615Z                  from tool_filetime.c:22:
2020-10-14T09:28:52.1275602Z tool_filetime.c: In function 'setfiletime':
2020-10-14T09:28:52.1276670Z tool_filetime.c:106:15: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:28:52.1277949Z   106 |               "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:28:52.1278863Z       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:28:52.1280631Z tool_filetime.c:106:15: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:28:52.1281620Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:28:52.1282397Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:28:52.1282945Z                  from tool_setup.h:36,
2020-10-14T09:28:52.1283792Z                  from tool_filetime.h:24,
2020-10-14T09:28:52.1284368Z                  from tool_filetime.c:22:
2020-10-14T09:28:52.1284920Z ../include/curl/system.h:199:42: note: format string is defined here
2020-10-14T09:28:52.1285409Z   199 | #  define CURL_FORMAT_CURL_OFF_T     "I64d"
2020-10-14T09:28:52.1286059Z tool_filetime.c:125:17: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:28:52.1286627Z   125 |                 "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:28:52.1287160Z       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:28:52.1288135Z tool_filetime.c:125:17: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:28:52.1288779Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:28:52.1289263Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:28:52.1289676Z                  from tool_setup.h:36,
2020-10-14T09:28:52.1290151Z                  from tool_filetime.h:24,
2020-10-14T09:28:52.1290580Z                  from tool_filetime.c:22:
2020-10-14T09:28:52.1291117Z ../include/curl/system.h:199:42: note: format string is defined here
2020-10-14T09:28:52.1291639Z   199 | #  define CURL_FORMAT_CURL_OFF_T     "I64d"
2020-10-14T09:28:52.1292167Z tool_filetime.c:133:15: error: ISO C does not support the 'I' printf flag [-Werror=format=]
2020-10-14T09:28:52.1292771Z   133 |               "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
2020-10-14T09:28:52.1293359Z       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-10-14T09:28:52.1294375Z tool_filetime.c:133:15: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t' {aka 'long long int'} [-Werror=format=]
2020-10-14T09:28:52.1295116Z In file included from ../include/curl/curl.h:38,
2020-10-14T09:28:52.1295549Z                  from ../lib/curl_setup.h:152,
2020-10-14T09:28:52.1296015Z                  from tool_setup.h:36,
2020-10-14T09:28:52.1296439Z                  from tool_filetime.h:24,
2020-10-14T09:28:52.1296959Z                  from tool_filetime.c:22:
2020-10-14T09:28:52.1297501Z ../include/curl/system.h:199:42: note: format string is defined here
2020-10-14T09:28:52.1297983Z   199 | #  define CURL_FORMAT_CURL_OFF_T     "I64d"
2020-10-14T09:28:52.1550855Z cc1.exe: all warnings being treated as errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationWindowsWindows-specificbuild

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions