Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Stenberg
142ac257b3
lib: convert Curl_get_line to use dynbuf
Create the line in a dynbuf. Aborts the reading of the file on
errors. Avoids having to always allocate maximum amount from the
start. Avoids direct malloc.

Closes #12846
2024-02-07 09:22:10 +01:00
Viktor Szakats
a9fd0d0083
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
2023-11-18 11:16:32 +00:00
Daniel Stenberg
e90d356570
unit3200: skip testing if function is not present
Fake a successful run since we have no easy mechanism to skip this test
for this advanced condition.
2023-08-17 17:17:59 +02:00
Daniel Stenberg
51118ba84c
tests: fix bad printf format flags in test code 2023-08-07 10:46:14 +02:00
Dan Fandrich
a13ef31d0f 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.
2023-04-01 08:59:38 -07:00
Dan Fandrich
6e3734f74f tests: fix unit tests to run with a dynamic log directory
Ref: #10818
2023-03-30 09:53:57 -07:00
Daniel Stenberg
2bc1d775f5
copyright: update all copyright lines and remove year ranges
- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205
2023-01-03 09:19:21 +01:00
Rob de Wit
73c4f9696a
curl_get_line: allow last line without newline char
improve backwards compatibility

Test 3200 verifies

Closes #9973
2022-12-02 11:28:43 +01:00