Armin Novak
b724ba546d
[checks,return] fix various unchecked return values
2026-03-03 09:40:27 +01:00
Armin Novak
7de0a5bba4
[winpr] fix various return checks
2026-03-02 18:39:42 +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
b6a0c94008
[winpr,utils] simplify ObjectPool
...
Clean up and centralize resource allocation and free for ObjectPool
2026-02-28 10:58:41 +01:00
Armin Novak
d3c941768f
[winpr,utils] fix SAM return checks
2026-02-27 15:52:35 +01:00
Armin Novak
486caf5516
[winpr] fix InitializeCriticalSectionAndSpinCount
...
Check return values when used.
2026-02-27 15:52:34 +01:00
Armin Novak
0445ed6734
[winpr,pubsub] check return of PubSub_Subscribe
2026-02-27 15:52:32 +01:00
Armin Novak
aa9d5912df
[winpr,stream] fix unused results
2026-02-27 15:52:29 +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
822257bf7c
[c23,winpr] replace NULL with nullptr
2026-02-26 21:16:48 +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
208bcbd153
[winpr] Add initializer functions
...
* Add initializer for wStream
* Add initializer for ASN1 decoder
2026-02-25 19:39:24 +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
3fcc287b16
[warnings] initialize all va_list
2026-02-25 07:41:39 +01:00
Armin Novak
8a24443ed6
[nodiscard] fix wrong attribute position
2026-02-24 16:10:11 +01:00
Armin Novak
33bcf76950
[winpr,collections] fix Queue and MessageQueue
...
EnsureCapacity was nulling the wrong elements, this commit rectifies
that.
2026-02-19 12:07:42 +01:00
Armin Novak
b08892fb9c
[winpr,utils] improve TestQueue
...
properly test queue fill, drain and resize
2026-02-18 15:43:40 +01:00
Armin Novak
d48452faf3
[winpr,utils] Add Queue_Capacity
2026-02-18 15:43:40 +01:00
Armin Novak
b78cb455cb
[winpr,queue] improve queue management
...
* Fix Queue_EnsureCapacity reallocation handling, ensure queue->tail is
properly updated.
* Fix allocation behaviour, use growthFactor * 32 as block size.
* Add doxygen for Queue_New
2026-02-18 15:43:39 +01:00
Armin Novak
c0d477d278
[winpr,utils] improve TestMessageQueue
...
properly test queue fill, drain and resize
2026-02-18 15:32:04 +01:00
Armin Novak
57dfd75231
[winpr,utils] add MessageQueue_Capacity
2026-02-18 14:26:03 +01:00
Armin Novak
c9b72743e3
[winpr,utils] ensure message queue capacity
...
the capacity should always be larger than what is actually used.
2026-02-18 14:26:03 +01:00
Armin Novak
3b286a923d
[winpr,stream] improve return checks in Stream_EnsureCapacity
...
* Properly check all return values and propagate them back to caller
* Simplify new stream size calculation
2026-02-18 14:26:03 +01:00
Armin Novak
d015ba58de
[winpr,collections] fix sign warnings
2026-02-17 16:38:35 +01:00
Armin Novak
118afc0b95
[allocations] fix growth of preallocated buffers
...
* Replace * 2 with * sizeof(WCHAR) for string usages
* Grow streams and other buffers reasonably, e.g. add 128 elements per
try and check for possible overflows
* Add constant postfix to force them to 64bit
2026-02-17 13:54:34 +01:00
Armin Novak
399d92f26e
[winpr] mark function pointers [[nodiscard]]
2026-02-15 23:57:23 +01:00
Armin Novak
47c538fd3f
[winpr] fix uninitialized variables
2026-02-10 16:56:44 +01:00
Armin Novak
52cf5d18f4
[winpr,utils] fix WITH_RESOURCE_VERSIONING
...
winpr_getApplicationDetailsVersion returned a wrong value.
2026-02-10 15:53:04 +01:00
Armin Novak
5f7f1672ff
[winpr,utils] add application details getter/setter
...
* Allow an application to set a vendor/product/version namespace to search
for configuration files/settings/...
* Replace all WINPR_VENDOR_STRING et al macros with these getters
2026-01-29 22:47:40 +01:00
akallabeth
1e4c1cd526
[winpr] mark all WINPR_ATTR_MALLOC also nodiscard
2026-01-26 13:39:41 +01:00
akallabeth
75ca7c181f
[winpr,wlog] remove duplicate wlog destroy
2026-01-23 22:20:51 +01:00
akallabeth
35b9d1b338
[c,printf] fix wlog format string to match arguments
2026-01-16 11:43:33 +01:00
akallabeth
220dedc723
[winpr,collections] use ListDictionary_Lock
...
For internal sync, do not directly call EnterCriticalSection but use
the wrapper
2026-01-12 09:03:42 +01:00
Armin Novak
3365d4fb12
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:46 +01:00
Armin Novak
91d865aefb
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:46 +01:00
Armin Novak
f44acc3d25
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:46 +01:00
Armin Novak
4a29dcac42
[winpr,utils] explicit NULL checks in jansson WINPR_JSON_ParseWithLength
2025-12-11 09:08:57 +01:00
akallabeth
bbae8d1d6b
[winpr,utils] fix jansson wrapper
...
* Fix WINPR_JSON_ParseWithLength (jansson does not like buffer sizes
larger than the JSON strig)
* Implement WINPR_JSON_GetErrorPtr
2025-12-10 15:22:57 +01:00
akallabeth
3390e27725
[winpr,utils] fix command line error logging
...
* fix log messages
* add missing error branches
* fix initialization of logger
2025-11-24 15:56:41 +01:00
akallabeth
f5a51d72b3
[winpr,utils] improve WLog logging
...
* Increase maximum message size to 16384 bytes (ARM transport logs huge
texts)
* Unify text message logging to a single function
2025-11-11 11:41:15 +01:00
akallabeth
0dd6d838bb
[winpr,json] add WINPR_JSON_AddIntegerToObject
...
This function adds a integer value (in contrast to real values with
WINPR_JSON_AddNumberToObject) to a JSON object.
2025-10-28 11:13:44 +01:00
Armin Novak
4300fc586d
[winpr,json] check for jansson required minimum version
2025-10-01 14:34:26 +02:00
Armin Novak
204079d73c
[winpr,json] fix WINPR_JSON_AddItemToArray
...
Use reference stealing version to add the item to the array
2025-09-30 17:19:56 +02:00
Armin Novak
b2783956bf
[winpr,json] fix jansson return value check
...
json_object_set_new returns 0 on success, -1 on failure
2025-09-30 17:05:05 +02:00
Armin Novak
5c69cf1406
[winpr,json] fix jansson reference count
2025-09-30 17:04:59 +02:00
Armin Novak
fde7eb57ee
[winpr,json] fix jansson WINPR_JSON_GetNumberValue
2025-09-30 13:18:55 +02:00