akallabeth
ffa28414ef
[winpr,thread] remove wrong log message
2025-02-14 09:49:43 +01:00
akallabeth
76c2944d99
[winpr,warnings] fix -Wunused-parameter
2025-02-13 15:53:51 +01:00
akallabeth
ea2022b76b
[clang,tidy] fix warnings
2025-01-15 09:32:52 +01:00
akallabeth
307bf48870
[warnings] fix integer casting in winpr
...
* use WINPR_ASSERTING_INT_CAST to detect overflows in sign or narrow
integer casts
* replace defines with static variables
2025-01-03 10:08:57 +01:00
akallabeth
781b278487
[winpr,thread] fix pthread_t to DWORD cast
2024-12-08 22:55:51 +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
akallabeth
fdba9bfc46
[winpr,thread] improve unittest
2024-11-22 11:10:43 +01:00
akallabeth
cbffbd16db
[winpr,thread] fix bugprone dec in condition
2024-11-22 11:00:36 +01:00
akallabeth
aa954d9be9
[warnings] fix various compiler warnings
2024-10-29 15:49:43 +01:00
Armin Novak
527db6783b
[cmake] split tests
...
* Keep BUILD_TESTING, but only run tests compatible with API (for
packaging)
* Add BUILD_TESTING_INTERNAL for all tests including internal function
tests that modify API to be run on our CI
2024-10-24 09:45:44 +02:00
akallabeth
e41f8eb61f
[warnings] redundant cast
2024-10-22 09:50:22 +02:00
akallabeth
f346b94835
replace SIZE_T with size_t
2024-10-17 12:40:22 +02:00
akallabeth
1cdc864c7d
[warnings] fix integer narrowing
2024-10-14 10:31:38 +02:00
akallabeth
a820912a24
[winpr,utils] fix sterror_r detection and use
2024-09-30 15:41:50 +02:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle
2024-09-16 08:22:31 +02:00
akallabeth
0d5bc92a2b
[warnings] fix apple iOS/macos
2024-09-15 19:47:13 +02:00
akallabeth
5a4a1a40ad
fix declaration and implementation parameter names
2024-09-03 12:24:53 +02:00
akallabeth
190929c018
[warnings] fix function pointer casts
2024-08-30 15:40:01 +02:00
akallabeth
6a3564407e
[warnings] fix clang-tidy issues in winpr
2024-08-29 15:20:39 +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
Armin Novak
d71af44bb1
[warnings] disable warnings for generated code
...
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.
These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
ef4c1766d2
[winpr,thread] implement SetThreadPriority
2024-05-24 15:44:17 +02:00
akallabeth
f4b7c59915
[cmake] move platform defines to common include
...
* Move platform specific settings to a common CMake include
2024-03-20 09:11:08 +01:00
akallabeth
d87d598305
[winpr] add WINPR_ALIGN64 defines
...
Add defines to aling struct members to 8 bytes
2024-03-12 14:24:36 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +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
2fffcd64b9
[winpr] use winpr_strerror instead of strerror
...
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
akallabeth
1b31852d32
[git] remove .gitignore
...
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
David Fort
56324906a2
TestThreadExitThread: fix messages and wait timeout for the windows CI
...
Looks like for the windows x86_86 CI host 100ms is too small for a thread to terminate
so let's wait for longer and decrease the number of loops.
2023-08-12 09:24:08 -04:00
Rubycat
cec88e53bd
don't log an error when running GetCurrentThread from non winpr thread
...
Since 7c4a774e4e
this can legitimately happen in WaitForMultipleObjectsEx and is not
actually an error.
2023-04-07 11:03:56 +02:00
Armin Novak
641022b795
[logging] remove __FUNCTION__ from actual message
...
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
92d3e3c64a
[winpr] use WINPR_ prefix for conditional includes
2023-01-10 17:38:00 +01:00
akallabeth
43c5289928
Replaced memset/ZeroMemory with initializer
...
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
David Fort
c5c2e37f6d
More winpr fixes ( #8255 )
...
* Fix build with mingw
4a71cab2e7 broke wf_events.c.
The drive channel was not building because of missing definitions.
* winpr: make functions return False when not implemented
2022-09-28 16:07:04 +02:00
David Fort
e944d8d243
winpr: improve WaitForSingleObject and WaitForMultipleObject with processes
...
This patch improves waiting on process handles:
* under linux we take advantage of pidfd if available, when it can be used it
allows to have one or more process in the objects that are WaitForMultipleObject-ed.
* the patch also make the code honor the timeout parameter during a WaitForSingleObject and
possibly run completion when WaitForSingleObjectEx is executed with alertable set to true
2022-09-26 12:08:00 +02:00
David Fort
56204164fe
core: check the kind of object for events and threads functions
...
This patch adds some checks for the type of object in Event and Thread functions,
this may help to find bugs where a handle with the wrong type is used as argument
of these functions.
2022-09-21 16:04:02 +02:00
David Fort
da10710cf9
winpr: complement thread tests and fix some asserts ( #8105 )
2022-08-02 11:40:55 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +02:00
David Fort
a612ca4ba2
winpr: fix unitary test when CreateProcess is CreateProcessW
...
As the second argument of CreateProcessW is modified to split with spaces and so
this can not be a const arg.
2022-05-05 13:11:18 +02:00
akallabeth
ec699f6c75
scanbuild fixes
2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a
Fixed warnings
2022-04-28 11:24:51 +02:00
Armin Novak
e1b4b4aee0
Replaced WINPR_HANDLE_DEF with a struct type
2022-04-28 08:42:09 +02:00
Armin Novak
833a445e4e
Refactor thread condition logic
...
* Add better return value checks
* Combine logic blocks in structs
* Add (easier to read) static functions for blocks
* Use condition variables only in combination with BOOL
2022-04-27 18:12:37 +02:00
akallabeth
752ac3b479
Fix #7793 : Do not expose internal input API ( #7794 )
...
* Fixed GetFileInformationByHandle initializers
* Fix #7793 : Do not expose internal input API
Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU
* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
Mike Gabriel
d337ea9c16
winpr/{libwinpr/thread/thread.c,include/winpr/thread.h}: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF.
2022-03-08 09:16:10 +01:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
akallabeth
8cc6582044
Unify struct definitions ( #7633 )
...
* Unified enum/struct definitions, fixed include issues
* Fixed mac compilation issues
* Added missing include
* Fixed windows server build warnings
* Fixed VS2010 build issue
* Removed unnecessary library linking
* Fixed ThreadPool WinXP compatibility
* Fixed pr review remarks
2022-02-14 14:59:22 +01:00