Commit Graph

76 Commits

Author SHA1 Message Date
Armin Novak
b724ba546d [checks,return] fix various unchecked return values 2026-03-03 09:40:27 +01:00
Armin Novak
2b0637d629 [nodiscard] mark more internal functions 2026-03-02 11:57:27 +01:00
Armin Novak
e6fca2c021 [winpr,stream] Fix Stream_SetPosition return checks 2026-03-02 11:37:20 +01:00
Armin Novak
5a532269ef [winpr,stream] Check Stream_SetLength return 2026-03-02 11:08:08 +01:00
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
ea77d2d922 [nodiscard] fix all InitOnceExecuteOnce usages 2026-02-27 15:52:28 +01:00
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
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
4e4f84d33d [libfreerdp] mark internal functions [[nodiscard]] 2026-02-24 11:54:00 +01:00
akallabeth
a2af4ff0f5 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:13 +01:00
Armin Novak
aabaf91f9c [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:42 +01:00
akallabeth
8b9335aa90 [CMake,libfreerdp] add pkg-config dependencies 2025-09-11 07:17:42 +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
2fb2e5f9c5 [crypto,key] add function to export PEM and create a key
* freerdp_key_generate creates a new key
* freerdp_key_get_pem exports the key as PEM
2025-04-22 12:00:40 +02:00
akallabeth
1fe0ca41e1 [warnings] fix missing integer casts 2025-03-11 13:20:19 +01:00
akallabeth
a520f845a3 [warnings] fix -Wunused-macro
comment or delete macros that were not used.
2025-02-26 22:12:18 +01:00
akallabeth
74cd8d8fe0 [freerdp,warnings] fix -Wunused-parameter 2025-02-13 15:53:54 +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
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
7f27e168b3 [emu,scard] flag allocator with nolint
The allocator keeps an internal list of allocated contexts. No manual
free required.
2024-11-12 16:46:01 +01:00
akallabeth
78acedb40e [warnigns] fix Wshorten-64-to-32 2024-11-11 10:22:37 +01:00
akallabeth
4ec28e1f82 [warnings] fix -Wimplicit-int-conversion 2024-10-31 11:42:29 +01:00
akallabeth
b5dbe5a167 [emu,scard] fix integer narrow 2024-10-03 18:58:46 +02:00
akallabeth
239440e28d [warnings] remove or comment unused macros 2024-09-20 18:49:38 +02:00
akallabeth
c0d06c782b [return checks] fix missing checks
* Stream_EnsureRemainingCapacity
* rdp_client_transition_to_state
2024-09-16 06:48:19 +02:00
akallabeth
a1cef8dd85 [warnings] silence and fix unused results 2024-09-14 21:29:28 +02:00
akallabeth
c9b0c9ecd5 [warnings] remove unused variables 2024-09-12 10:08:10 +02:00
akallabeth
42b078a59d [emu,scard] smartcard emulation cleanup
* Fix readability-non-const-parameter (disable lint, API requires these
  to be non const)
* Return an appropriate error for functions returning
  SCARD_E_UNSUPPORTED_FEATURE if there is a parameter wrong
* Remove unused functions
2024-09-03 12:24:55 +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
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
d099c2ffd2 [emu,scard] use single cache
Just like with PCSC use a single cache and create the identifier from
UUID and identifier
2024-07-25 15:47:44 +02:00
Armin Novak
9e71b423cd [warnings] fix various compiler warnings 2024-07-24 11:08:20 +02:00
akallabeth
325fb16301 [emu,scard] fix compiler warnings 2024-07-22 15:08:48 +02:00
akallabeth
71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
akallabeth
501b86baf4 [coverity] 1543153 Resource leak 2024-04-12 09:45:09 +02:00
Armin Novak
8b2e13d989 [emu,scard] abort busy loop on session cancel 2024-04-05 13:06:57 +02:00
amazingfate
e21afefb86 fix build with openssl < 1.1.1 2024-02-23 12:45:36 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
b894199f72 [winpr,collections] add generic string clone functions
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
akallabeth
0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 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
akallabeth
ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
Armin Novak
9575f386cd fixed WCHAR constants, use endian safe definitions 2023-12-20 09:03:58 +01:00
Armin Novak
1048ad4003 [scard] allow INFINITE timeout 2023-11-21 15:54:01 +01:00
akallabeth
5a7a1c159d [casts] remove fnObject* function pointer casts
use proper types that match the function pointer definition to avoid
surprises if the code should be refactored
2023-09-20 21:11:30 +02:00
akallabeth
d350b89fe3 [emu,scard] fix return type 2023-08-25 14:36:05 +02:00
akallabeth
1fc0d5b4b1 [winpr] remove casts for winpr_RAND calls 2023-06-21 09:57:52 +02:00