191 Commits

Author SHA1 Message Date
Armin Novak
92ab55c5e1 [winpr,stream] Add Stream_ResetPosition
A helper function that does not require return checks, in contrast to
Stream_SetPosition, which might fail.
2026-03-01 06:11:59 +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
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +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
1dde0b3eeb [codec,progressive] refine progressive decoding
Refinement of 1a7a4c508c that might
produce glitches.
2026-02-20 17:45:18 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
Armin Novak
e0e6a7f800 [freerdp,warnings] properly handle function return 2026-02-16 09:18:37 +01:00
akallabeth
1a7a4c508c [codec,progressive] fix progressive_rfx_upgrade_block
do not shift negative values, apply sign after shift.
2026-01-14 19:25:46 +01:00
Armin Novak
32e831506b [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:36 +01:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
Armin Novak
00968fd6e6 [codec] use default threadpool 2025-09-03 16:22:41 +02:00
akallabeth
65f18983ed [warnings] Fix format string errors
* Fix casts of format string arguments (%p requires void*)
* Fix format string to match type of arguments
2025-08-13 15:09:48 +02:00
akallabeth
7e461a0327 [codec,progressive] fix region cleanup 2025-03-13 08:45:42 +01:00
akallabeth
1fe0ca41e1 [warnings] fix missing integer casts 2025-03-11 13:20:19 +01:00
akallabeth
85fdbc3b71 [codec,progressive] clamp values instead of assert 2025-03-11 12:35:56 +01:00
akallabeth
054275bd5d [warnings] fix sign and narrowing issues 2025-03-10 19:19:28 +01:00
akallabeth
0bb49c94c9 [restrict] unify restrict keyword usage 2025-03-10 18:48:16 +01:00
akallabeth
d4f7fb081b [warnings] fix -Wunused-function
* delete unused functions that are no longer required
* define guard functions only used while debugging
2025-02-27 19:29:46 +01:00
akallabeth
74cd8d8fe0 [freerdp,warnings] fix -Wunused-parameter 2025-02-13 15:53:54 +01:00
Armin Novak
664321dd04 [clang,tidy] fix cast warnings 2025-01-15 15:35:09 +01:00
David Fort
88229dca51 Fix calls of Stream_EnsureCapacity
There were various places where Stream_EnsureCapacity was called instead of the
expected Stream_EnsureRemainingCapacity. When the stream position is set to 0 the
2 calls are equivalent, but we had various places where it was not always the case.
2025-01-13 14:49:18 +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
83f2f21ad3 [warnigns] fix lots of bugprone warnings
* update-settings-tests: properly cast types in getter/setter
* wtypes: fix PHANDLE definition
* wStream: fix INT64 write function warnings
* Simplify HANDLE copy in channels, just assign after proper cast
2024-12-06 09:15:48 +01:00
akallabeth
490ca0453b [winpr,stream] use Stream_BufferAs instead of casting 2024-10-01 10:34:42 +02:00
Armin Novak
fdd8a5cedd [codec,progressive] fix result cast in progressive_rfx_srl_read 2024-09-18 13:14:19 +02:00
akallabeth
ba41d5e532 [warnings] fix unchecked return 2024-09-15 09:08:02 +02:00
akallabeth
d5b41bb8a0 [warnings] fix casts
* Add macro WINPR_REINTERPRET_CAST to cast (checked) from type A to B
* Fix cast warnings
2024-09-14 08:24:51 +02:00
akallabeth
c84655cd62 [warnings] remove const params
Avoid const TYPE* const type declarations
2024-09-12 14:29:25 +02:00
akallabeth
a1a1fc8658 [warnings] fix mismatches between declaration and implementation 2024-09-12 13:32:44 +02:00
akallabeth
9c9d74e920 [warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
15456e1ee1 [warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
ba7fd06ec4 [coverity] fix some warnings
* mostly dead store and identical code branches.
* some possible integer overflows
2024-08-23 12:38:41 +02:00
akallabeth
a5bb0bf203 [primitives] add lShiftC_16s_inplace 2024-06-08 08:34:21 +02:00
akallabeth
dee9019e7c [codec,progressive] use add_16s_inplace 2024-06-08 08:34:18 +02:00
akallabeth
3c2702afd3 [codec,progressive] use preallocated workers
allocate PTP_WORK and PROGRESSIVE_TILE_PROCESS_WORK_PARAM in
PROGRESSIVE_BLOCK_REGION
2024-06-04 18:49:47 +02:00
akallabeth
6ad17cac6e [codec,progressive] restrict keyword 2024-06-03 17:55:35 +02:00
akallabeth
1b3f3a0408 [codec,color] expose freerdp_image_copy (no)overlap
expose functions for overlapping and non overlapping images to use
directly
2024-05-23 14:48:36 +02:00
Armin Novak
e272eb3966 [warnings] fix Wshadow warnings 2024-05-08 15:30:01 +02:00
akallabeth
b1f11bd8a4 [codec,progressive] move update to frame change 2024-04-19 09:49:02 +02:00
akallabeth
41dd15c5e8 [codec,progressive] revert 4e24b966c8
do not reset progressive surface numUpdatedTiles after
progressive_decompress pass. The updates might accumulate until the
frameId changes, only then reset.
2024-04-19 09:49:02 +02:00
Armin Novak
28e9094f08 [gcc] fix missing malloc warning macros
* Add missing WINPR_ATTR_MALLOC
* Add missing WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
2024-04-17 18:47:16 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
81d2c1f057 [clang-tidy] clang-analyzer-core.NullDereference 2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
Armin Novak
4778203340 [restrict] remove from in/out buffers 2023-10-16 15:10:13 +02:00
Armin Novak
fe28f9ed9c [keyword,restrict] do not use for shift operations
shifting operations are done on a in/out buffer, so the restrict keyword
is not appropriate for that.
2023-10-16 15:10:13 +02:00
akallabeth
a41360e3b0 [codec,rfx] added missing RFX encoder API calls 2023-10-07 21:26:27 +02:00
Armin Novak
79da16244e [codec,progressive] fix overlapping buffers 2023-09-15 11:24:21 +02:00