Armin Novak
d34f41a30b
[winpr,sspi] fix missing return check
2026-03-03 09:30:32 +01:00
Armin Novak
7de0a5bba4
[winpr] fix various return checks
2026-03-02 18:39:42 +01:00
Armin Novak
b1e4933c78
[winpr,clipboard] ClipboardRegisterSynthesizer return checks
2026-03-02 18:32:37 +01:00
Armin Novak
a694b4f22b
[winpr,crypto] simplify expression
2026-03-02 16:31:09 +01:00
Armin Novak
e6fca2c021
[winpr,stream] Fix Stream_SetPosition return checks
2026-03-02 11:37:20 +01:00
Armin Novak
0f46216a24
[winpr,ssl] check winpr_InitializeSSL return
2026-03-02 11:21:21 +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
e2d98d03b2
[winpr,crypto] fix CryptProtectMemory regression
...
in bb4b7a8693 introduced checks did not
free resources in all branches.
2026-02-28 10:58:41 +01:00
Armin Novak
098b1f2d4f
[winpr,sspi] fix return value checks
2026-02-27 15:52:36 +01:00
Armin Novak
bb4b7a8693
[winpr,cypto] fix return checks
2026-02-27 15:52:35 +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
593d36592d
[winpr,ntlm] fix return checks
2026-02-27 15:52:33 +01:00
Armin Novak
0445ed6734
[winpr,pubsub] check return of PubSub_Subscribe
2026-02-27 15:52:32 +01:00
Armin Novak
b93c4ad965
[winpr,ntlm] fix winpr_RC4 and winpr_MD5 return checks
2026-02-27 15:52:30 +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
b1d401a84e
[winpr,platform] add nullptr fallback for pre C23
2026-02-26 13:43:51 +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
e6c17b13cd
[winpr,platform] fix WINPR_ATTR_MALLOC for older GCC
2026-02-26 09:05:29 +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
a5609b929e
[winpr,ncrypt] use pragma once as guard
2026-02-25 15:05:51 +01:00
Armin Novak
5479777822
[winpr,file] fix unit test for WriteFile
2026-02-25 13:39:38 +01:00
Armin Novak
88e8c843f9
[winpr,platform] fall back to attribute for GCC
...
GCC does not like [[nodiscard]] on function pointers. Fall back to
attribute(warn_unused_result) syntax, which does seem to work.
2026-02-25 11:51:12 +01:00
Armin Novak
e9723d1b61
[attributes] update attribute definitions
...
* support C++
* support C23
* replace __inline et al with C11 inline
2026-02-25 11:51:11 +01:00
Armin Novak
3fcc287b16
[warnings] initialize all va_list
2026-02-25 07:41:39 +01:00
Armin Novak
b7892a7cc1
[winpr,sspi] fix kerberos unused warnings
...
when building without kerberos, eliminate all unused warnings
2026-02-25 07:41:39 +01:00
Armin Novak
3c84d08518
[winpr,platform] add C++ guards for macros
...
define attributes when included from C++ code
2026-02-24 17:14:56 +01:00
Armin Novak
c1d0653c87
[winpr,platform] fix C23 checks
...
https://en.cppreference.com/w/c/language/attributes.html has a nice
overview of attributes and when they were introduced. Adjust macro
checks accordingly.
2026-02-24 17:14:40 +01:00
Armin Novak
6cebb3e0cd
[winpr] fix sign warnings
2026-02-24 16:23:15 +01:00
Armin Novak
8a24443ed6
[nodiscard] fix wrong attribute position
2026-02-24 16:10:11 +01:00
Armin Novak
a9be86ecfa
[winpr,platform] add C23 [[nodiscard]]
2026-02-24 16:10:05 +01:00
Armin Novak
7c0a0c903b
[winpr,crypto] use size_t as length for md[45]
2026-02-24 09:05:46 +01:00
Armin Novak
262dade595
[cmake] Define WINPR_DEFINE_ATTR_NODISCARD
...
* Do not define WINPR_ATTR_NODISCARD if WINPR_DEFINE_ATTR_NODISCARD is
not defined.
* Define WINPR_DEFINE_ATTR_NODISCARD via CMake to enable this for
internal use only
2026-02-20 09:01:54 +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