Armin Novak
35831303ea
[various] add proper return checks
2026-03-02 18:32:38 +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
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
akallabeth
497f532bc2
[c,printf] fix wlog format string to match arguments
2026-01-16 11:41:04 +01:00
Armin Novak
ef8b76887a
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:37 +01:00
Armin Novak
052c046ce4
[common,settings] fix resize of TargetNetAddressess
...
* FreeRDP_TargetNetAddresses and FreeRDP_ReceivedCapabilityData need to
free up used slots when resizing.
* freerdp_target_net_addresses_resize should not unconditionally discard
values on resize.
2025-09-30 16:05:39 +02:00
Armin Novak
6cfdf9e43e
[json] use WINPR_JSON_GetObjectItemCaseSensitive
...
Prefer usage of case sensitive functions that are faster.
2025-09-23 12:38:23 +02:00
akallabeth
83ffa524e9
[core,settings] fix ReceivedCapabilities reset
2025-08-26 12:09:09 +02:00
akallabeth
ec8f2b5dde
[common,settings] force reallocation on caps copy
2025-07-01 09:49:44 +02:00
akallabeth
a86e3dc53c
[client,sdl] print current video driver
2025-06-24 15:43:57 +02:00
akallabeth
efbc9f7cbc
[common,settings] fix int casts
2025-06-24 09:38:23 +02:00
akallabeth
635d6319c6
[common,settings] fix freerdp_device_clone
...
automount property of RDPDR_DTYP_FILESYSTEM was not copied, fix that.
2025-05-22 09:35:03 +02:00
akallabeth
06564e4bc2
[core,settings] fix freerdp_device_collection_add
...
* Assert usage of DeviceArray, ensure returned values are != NULL if
within DeviceCount
* Only reset newly allocated DeviceArray members on resize
2025-04-25 10:21:37 +02:00
Armin Novak
bc22b9d8da
[common,settings] eliminate dead code
2025-04-23 10:13:30 +02:00
Armin Novak
6a20b7bfd8
[common,settings] fix add_string_or_null
...
* If the value is NULL do not check WINPR_JSON_AddNullToObject return as
that is most likely also NULL
* Fix testcase, always use goto for error handling
2025-04-23 09:31:59 +02:00
Armin Novak
a4c4bad132
[common,settings] new settings (de)serialization API
...
* Add rdpKey to PEM conversion
* Modify WINPR_JSON_Version to return -1 if not supported
* Add rdpSettings serialize and deserialize functions
2025-04-22 12:00:48 +02:00
Armin Novak
e92f0170e4
[core,settings] handle empty OrderSupport and received capabilities
2025-04-15 16:09:46 +02:00
akallabeth
7b9b47555f
[core,capabilties] use dynamic logger
2025-03-17 10:52:52 +01:00
akallabeth
567887fbb0
[core,settings] Fix MONITOR_DEF settings
...
* Make FreeRDP_MonitorLocalShiftX and FreeRDP_MonitorLocalShiftY signed
* Add function freerdp_settings_set_monitor_def_array_sorted to proplery
align the MONITOR_DEF array according to RDP requirements
2025-01-19 15:30:56 +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
David Fort
f0f830f3e9
Cleanup freerdp_settings_set_pointer_len_
...
Instead of doing convertions to SSIZE_T for the key length id, use FreeRDP_UINT32_UNUSED
when a pointer has no associated len key.
2024-12-04 13:45:39 +01:00
akallabeth
78acedb40e
[warnigns] fix Wshorten-64-to-32
2024-11-11 10:22:37 +01:00
akallabeth
7ab30a1b18
[client,common] const correct pointer array arguments
2024-10-24 11:32:08 +02:00
akallabeth
dceb15d14e
[warnings] fix integer narrowing
2024-10-14 10:32:01 +02:00
akallabeth
ac1a922774
[common,settings] annotate freerdp_settings_set_value_for_name
...
we cast a SSIZE_T to the required enum value. Since we do not know the
enum contains any value at all it might lead to compiler/analyzer
warning us about that. Silence the warning as we can not avoid it.
2024-10-03 18:59:20 +02:00
akallabeth
315f793078
[common,settings] fix integer narrowing
2024-10-03 18:59:11 +02:00
akallabeth
f529345d84
[warnings] fix Wcast-qual
2024-09-30 09:31:36 +02:00
Armin Novak
c7c84682e1
[warnings] fix mismatched-dealloc
...
Some allocator functions have an error path where the corresponding free
function is called. Since the memory in the allocator function was
allocated using malloc/calloc the free function does not match. Silence
warnings with pragma macros
2024-09-18 15:35:28 +02:00
akallabeth
f655843260
[return checks] fix use of rdpSettings getter/setter
2024-09-16 06:48:23 +02:00
akallabeth
ba41d5e532
[warnings] fix unchecked return
2024-09-15 09:08:02 +02:00
akallabeth
afff514ca7
[compiler] add WINPR_ATTR_MALLOC
...
Add WINPR_ATTR_MALLOC checks to allocating functions to help compilers
find memory leaks or allocation mismatches
2024-09-12 20:09:22 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts
2024-08-29 12:03:09 +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
1466d70dbc
[coverity] null checks
2024-04-12 09:45:09 +02:00
akallabeth
b596ad0d45
[common,settings] accept 'on|off' as bool settings
2024-03-21 14:26:14 +01:00
akallabeth
93eb4df524
[core,gateway] implement RDG and TSG policy
...
* use dynamic logger in RDG
* honor [MS-TSGU] 2.2.9.2.1.5.2 TSG_REDIRECTION_FLAGS
* honor [MS-TSGU] 2.2.10.16 HTTP_TUNNEL_AUTH_RESPONSE
HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS flag
* add setting GatewayIgnoreRedirectionPolicy to ignore the gateway
policy if desired
2024-03-07 16:18:41 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +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
c2f4ad80a5
[common,settings] fix TargetNetAddresses usage
...
* use a common function to allocate both, TargetNetAddresses and
TargetNetPorts
* unify handling, utilize helper functions as much as possible
2024-01-09 15:18:37 +01:00
Armin Novak
3e9aad58f9
[common,settings] add documentation and missing API
...
* added freerdp_settings_are_valid for batch checks
* added missing settings function documentation
2023-11-24 14:54:56 +01:00
Armin Novak
704ee8bc4b
[settings] add unused values and sign correct keys
...
* add -1 as unused enum entry
* change key parameter type from size_t to SSIZE_T
2023-11-24 14:54:56 +01:00
Armin Novak
6e6559c41a
[settings] fix type mismatch warnings
2023-11-24 14:54:56 +01:00
akallabeth
82eefe0bd1
[settings] auto generate key types from struct
...
* use enum types for settings getter/setter to have compiler check if
keys are valid
* generate enum types from struct at compile time
* CMake option WITH_OPAQUE_SETTINGS to hide rdpStruct implementation
from external projects
2023-11-24 14:54:56 +01:00