#
fb711b50 |
| 29-Oct-2024 |
Viktor Szakats |
build: fix clang-cl builds, add CI job - appveyor: add build-only job for clang-cl. - cmake: `-pedantic-errors` enables `-Werror,-Wlanguage-extension-token` automatically, whi
build: fix clang-cl builds, add CI job - appveyor: add build-only job for clang-cl. - cmake: `-pedantic-errors` enables `-Werror,-Wlanguage-extension-token` automatically, which makes `__int64` detection fail. Explictly disable this compiler warning for clang-cl to make the feature detection work and to accept `__int64` in the source code. - cmake: disable `-Wlanguage-extension-token` warning for clang-cl to fix these when encountering `__int64`: ``` lib/formdata.c(797,29): error : extension used [-Werror,-Wlanguage-extension-token] lib/warnless.c(117,33): error : extension used [-Werror,-Wlanguage-extension-token] lib/warnless.c(60,28): message : expanded from macro 'CURL_MASK_SCOFFT' lib/warnless.c(59,38): message : expanded from macro 'CURL_MASK_UCOFFT' include\curl/system.h(352,40): message : expanded from macro 'CURL_TYPEOF_CURL_OFF_T' ``` - make `__GNUC__` warning suppressions apply to `__clang__` too. Necessary for clang-cl, which defines the latter, but not the former. (Regular clang defines both.) - examples: fix clang-cl compiler warning in `http2-upload.c`. ``` docs\examples\http2-upload.c(56,5): error : no previous prototype for function 'my_gettimeofday' [-Werror,-Wmissing-prototypes] docs\examples\http2-upload.c(56,1): message : declare 'static' if the function is not intended to be used outside of this translation unit ``` - unit2604: add missing `#pragma GCC diagnostic pop`. Follow-up to e53523fef07894991c69d907a7c7794c7ada4ff4 #14859 - unit1652: limit compiler warning suppression to GCC. They do not affect clang builds. Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772 Closes #15449
show more ...
|
#
25cbc2f7 |
| 11-May-2024 |
Viktor Szakats |
tests: make the unit test result type `CURLcode` Before this patch, the result code was a mixture of `int` and `CURLcode`. Also adjust casts and fix a couple of minor issues fou
tests: make the unit test result type `CURLcode` Before this patch, the result code was a mixture of `int` and `CURLcode`. Also adjust casts and fix a couple of minor issues found along the way. Cherry-picked from #13489 Closes #13600
show more ...
|
#
a9fd0d00 |
| 17-Nov-2023 |
Viktor Szakats |
build: always revert `#pragma GCC diagnostic` after use Before this patch some source files were overriding gcc warning options, but without restoring them at the end of the file. In CMa
build: always revert `#pragma GCC diagnostic` after use Before this patch some source files were overriding gcc warning options, but without restoring them at the end of the file. In CMake UNITY builds these options spilled over to the remainder of the source code, effecitvely disabling them for a larger portion of the codebase than intended. `#pragma clang diagnostic` didn't have such issue in the codebase. Reviewed-by: Marcel Raad Closes #12352
show more ...
|
#
a13ef31d |
| 01-Apr-2023 |
Dan Fandrich |
unit tests: use the unit test infrastructure better Allow UNITTEST_STOP to return the error code, use the fail & abort macros to indicate test failure and return success instead of fail
unit tests: use the unit test infrastructure better Allow UNITTEST_STOP to return the error code, use the fail & abort macros to indicate test failure and return success instead of fail if the unit test can't test anything because of missing features at compile-time. A couple of tests could never fail because they were overriding the failure return code.
show more ...
|