222 Commits

Author SHA1 Message Date
Armin Novak
89ab3c6c1b [nodiscard] Fix all winpr_RAND usages
* Check return value and act on it.
* Initialize arrays that were missed before.
2026-02-27 15:52:26 +01:00
Armin Novak
5c510af477 [c23,freerdp] replace NULL with nullptr 2026-02-26 15:06:27 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
13616cc67e [freerdp,codec] mark function pointers [[nodiscard]] 2026-02-16 09:18:35 +01:00
Armin Novak
af6e0e6241 [codec,test] replace fscanf in unit test 2026-02-10 16:38:19 +01:00
Armin Novak
8735c50e2f [codec,interleaved] add some unit tests
* Create a unit test framework to allow compaing some input data to
  expected output data
* Add a couple of test cases for encoder and decoder
* Add expected output data (of current implementation) to detect changes
  in later iterations
2025-09-30 14:09:15 +02:00
Armin Novak
4aceae4666 [codec,color] Add from string method for PIXEL_FORMAT
* Add FreeRDPGetColorFromatFromName to get a PIXEL_FORMAT from a given
  string.
* Add a unit test to ensure FreeRDPGetColorFromatFromName and
  FreeRDPGetColorFormatName work as expected
2025-09-30 13:17:26 +02:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
akallabeth
e423476e95 [codec,planar] more test log messages 2025-09-22 19:57:48 +02:00
akallabeth
632131b266 [deprecate] rename planar_decompress 2025-09-22 19:57:41 +02:00
akallabeth
3be0fe6c2a [codec,planar] more test output 2025-09-22 10:15:58 +02:00
akallabeth
757d7f819d [codec,planar] make test output verbose
make it easier to find out which test case failed.
2025-09-22 09:14:54 +02:00
akallabeth
37dabce9cc [codec,planar] unit test compare encoded data
keep a reference encoding of a given sample and compare the encoder
output to it. Not perfect but will fail whenever the encoder output
changes.
2025-09-12 19:53:05 +02:00
akallabeth
c06bf6ccb0 [warnings] fix format warnings 2025-03-24 21:23:10 +01:00
Armin Novak
64a7b665f6 [codec,region] code cleanup 2025-03-12 19:49:50 +01:00
Armin Novak
3e6707c443 [warnings] fix issues from ci builder 2025-03-12 12:02:04 +01:00
akallabeth
61910ad0b5 [dead code] remove some unused code
also fix some parts no longer compiling after enabling it again
2025-03-04 17:24:13 +01:00
akallabeth
6d541c8691 [warnings] eliminate dead code 2025-03-04 09:53:05 +01:00
akallabeth
82d74dbc96 [codec,test] fix warnings in img2bgra 2025-02-22 22:41:44 +01:00
akallabeth
0700485cf5 [codec,test] fix type mismatch 2025-02-22 14:17:57 +01:00
akallabeth
790b53fc86 [codec,test] add cursor test dumps 2025-02-20 16:06:21 +01:00
akallabeth
952e3962b6 [codec,test] img2bgra utility
allow reading an image and create a c header (raw data, bgra)
2025-02-20 15:59:16 +01:00
akallabeth
40dce19b0e [codec,test] add new unit test TestFreeRDPCodecCursor
* Generate a series of cursor images from source dumps and compare these
  to a reference image
* Generation is automatic by picking up .c/.h files from
  libfreerdp/codec/test/cursor directory.
2025-02-20 15:59:11 +01:00
akallabeth
323c6da940 [core] fix warnings and invalid return type 2025-02-13 14:43:31 +01:00
akallabeth
046413a8c3 [cmake] fix formatting 2025-01-31 12:29:37 +01:00
akallabeth
65feb9ecd1 [cmake,tests] add BUILD_TESTING_NO_H264
allow disabling H264 unit tests for package builds. Some distributions
do not ship full implementations for the package builders
2025-01-30 12:32:59 +01:00
akallabeth
ea2022b76b [clang,tidy] fix warnings 2025-01-15 09:32:52 +01:00
akallabeth
720d48583a [codec,h264] add basic unit test 2025-01-12 15:11:57 +01:00
akallabeth
0e7bc7f164 [codec,progressive] fix int narrowing warning 2025-01-07 21:28:09 +01:00
akallabeth
65418f9882 [codec,interleaved] fix int narrowing warning 2025-01-07 10:15:54 +01:00
akallabeth
cc934795e4 [warnings] fix integer casting
* use asserting casts to detect overflows or sign conversions
* code cleanup for issues uncovered by casts
2025-01-01 12:58:34 +01:00
akallabeth
ba8fd2ada5 [cmake] force configuration options
limit multiconfiguration options to supported types
2024-12-05 09:36:23 +01:00
akallabeth
faae38120c [cmake,format] reformat all cmake files 2024-11-27 20:41:48 +01:00
stephanebill
4f2afa8c47 spell check with codespell 2024-11-20 16:53:40 -05:00
akallabeth
dcf5a8e28c [warnings] fix -Wswitch-default 2024-10-31 11:42:24 +01:00
Armin Novak
527db6783b [cmake] split tests
* Keep BUILD_TESTING, but only run tests compatible with API (for
  packaging)
* Add BUILD_TESTING_INTERNAL for all tests including internal function
  tests that modify API to be run on our CI
2024-10-24 09:45:44 +02:00
akallabeth
fe8555a4fd [warnings] annotate cert-err34-c 2024-10-01 13:05:36 +02:00
akallabeth
a1cef8dd85 [warnings] silence and fix unused results 2024-09-14 21:29:28 +02:00
akallabeth
edf6ab89f7 [warnings] fix dead store 2024-09-10 14:43:11 +02:00
akallabeth
ba9897f8b7 [warnings] replace rand() function use 2024-08-29 17:13:53 +02:00
akallabeth
36c3184a0f [warnings] fix clang-tidy issues in libfreerdp 2024-08-29 15:34:22 +02:00
akallabeth
15456e1ee1 [warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
1d33095500 [warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
d71af44bb1 [warnings] disable warnings for generated code
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.

These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
bfffe28de6 [test,codec] speed up copy test
* Reduce default resolution from fullHD to fullHD/10
* Add command line arguments to set width and height manually
2024-06-03 17:55:30 +02:00
akallabeth
16955111b7 [test,gfx] add gfx dump option 2024-06-03 17:54:24 +02:00
akallabeth
07acfed668 [codec,color] add freerdp_image_copy test case 2024-05-27 10:00:12 +02:00
akallabeth
8779ebf8d4 [ci,oss-fuzz] run all codec tests 2024-04-19 11:26:47 +02:00
akallabeth
f3b2aea781 [cmake] add fuzzer tests
tests imported from https://github.com/ergnoorr/fuzzrdp

reported by Evgeny Legerov of Kaspersky Lab.
2024-04-16 13:06:22 +02:00