Commit Graph

19610 Commits

Author SHA1 Message Date
Armin Novak 107a8d9f48
[compiler] disable C++ warnings
Projects are set to require C++ 17, so disable all warnings complaining
about compatibility with previous versions of the standard.
2024-09-20 09:17:22 +02:00
Armin Novak 02b98e9287
[client,sdl] use constexpr instead of defines 2024-09-20 09:17:03 +02:00
Armin Novak c509aabc08
[cmake] disable -Wdisabled-macro-expansion
this warning does not yield useful results for FreeRDP, disable by
default.
2024-09-20 09:16:33 +02:00
Armin Novak 96052ca2fb
[build,c++] add CXXCompilerFlags to set warnings
Just like with the C components and CompilerFlags.cmake add a
configuration for C++ that disables specific warnings only found in C++
code.
2024-09-20 09:16:30 +02:00
Martin Fleisz e2d1938886
Merge pull request #10644 from FreeRDP/revert-10643-rdg
Revert "[core,gateway] read leftover http body in the rdg IN channel."
2024-09-19 13:56:35 +02:00
Vic Lee 35ad7e7d0d
Revert "[core,gateway] read leftover http body in the rdg IN channel." 2024-09-19 19:38:29 +08:00
akallabeth 33fcc04263
Merge pull request #10643 from llyzs/rdg
[core,gateway] read leftover http body in the rdg IN channel.
2024-09-19 13:21:26 +02:00
Vic Lee 56535c9663 [core,gateway] read leftover http body in the rdg IN channel. 2024-09-19 18:29:54 +08:00
Martin Fleisz 8cd12a87fd
Merge pull request #10639 from akallabeth/kbd-layout-fix
Kbd layout fix
2024-09-19 11:34:48 +02:00
Martin Fleisz 183be60bac
Merge pull request #10623 from akallabeth/warn-fixes-stream
Warn fixes stream
2024-09-19 09:49:19 +02:00
akallabeth 632e2180f7
[winpr,stream] rewrite stream read functions
Use a loop to shift in bytes to avoid casts.
2024-09-19 09:06:20 +02:00
Armin Novak 46457a5033
[winpr,stream] Add Stream_BufferAs macro
* Add Stream_BufferAs, Stream_ConstBufferAs, Stream_GetBufferAs and
  Stream_GetPointerAs to get a pointer to the stream pointer or buffer
  casted to a specific type.
* Use WINPR_STREAM_CAST in these new macros for proper cast according to
  C or C++
2024-09-19 09:06:13 +02:00
akallabeth c5e8326d07
Merge pull request #10640 from akallabeth/sdl-hicpp
[client,sdl] fix class constructors and operators
2024-09-19 08:26:52 +02:00
akallabeth 84719a4d83
[client,sdl] fix class constructors and operators
delete unused move/copy constructors and operators
2024-09-18 23:33:50 +02:00
akallabeth 564656166e
[locale,keyboard] add unit tests for functions 2024-09-18 21:31:16 +02:00
akallabeth 8d46de743e
Merge pull request #10638 from akallabeth/tidy-branch-clone
[clang-tidy] deactivate bugprone-branch-clone check
2024-09-18 21:22:13 +02:00
akallabeth 7ae1f07aa8
[locale,keyboard] fix missing input validation 2024-09-18 21:17:28 +02:00
akallabeth afde8e779b
[locale,keyboard] fix loading of keyboard locales
if keyboard locales should be loaded from a file also load the layouts
2024-09-18 21:17:21 +02:00
David Fort 37271d01fa
Merge pull request #10634 from akallabeth/warn-fixes-cov
[utils,smartcard] return after free
2024-09-18 21:13:58 +02:00
Armin Novak 98f2f69f60
[clang-tidy] deactivate bugprone-branch-clone check
The check triggers on switch cases running the same function and, more
importantly, on our macro CommandLineSwitchStart. Not usable for this
project, deactivating the check.
2024-09-18 16:14:55 +02:00
Martin Fleisz 33a7bee4f9
Merge pull request #10617 from akallabeth/sdl-scope-guard
Sdl scope guard
2024-09-18 15:41:22 +02:00
Armin Novak b4755a58dc
[utils,smartcard] return after free
In smartcard_ListReadersA_Call first free up memory and then return in
case of an error
2024-09-18 14:32:45 +02:00
Martin Fleisz c16e5ffcc2
Merge pull request #10631 from akallabeth/warn-fixes-cov
Warn fixes cov
2024-09-18 14:16:10 +02:00
Armin Novak fbbda2259d
[clang-tidy] deactivate cppcoreguidelines-pro-type-reinterpret-cast
we do noeed these casts for compatibility with C void* usage. Deactivate
this check to reduce noise.
2024-09-18 13:14:19 +02:00
Armin Novak fdd8a5cedd
[codec,progressive] fix result cast in progressive_rfx_srl_read 2024-09-18 13:14:19 +02:00
Armin Novak 3905ef0b01
[client,sdl] split sdl_client_thread_run
the function can easily be split into three funcions covering a specific
part of the thread loop. Makes the whole thing less complex and easier
to read.
2024-09-18 13:01:46 +02:00
akallabeth 8ef4b2aefa
[client,SDL] move thread cleanup to own function
The cleanup code for the RDP thread of the SDL clients grew quite
complex. Move to a function to reduce complexity and make the main
thread more readable again.
2024-09-18 11:48:35 +02:00
akallabeth b7601ec755
[client,SDL] remove goto usage, replace with RAII
* use std::uniqe_ptr to clean up malloced strings
* use ScopeGuard to run cleanup code whenever the function is exited
2024-09-18 11:48:35 +02:00
akallabeth ed2c5e9a5b
[client,sdl] add scope guard
add a class wrapping a cleanup function called when the class instance
is out of scope. useful to clean up C resources in a lambda function
2024-09-18 11:48:34 +02:00
Armin Novak 769b225278
[utils,smartcard] fix size checks 2024-09-18 11:47:02 +02:00
Armin Novak bed6e7968e
[winpr,utils] fix plausibility checks in IniFile_Load_File 2024-09-18 11:47:01 +02:00
Armin Novak 65f6541f67
[server,proxy] fix plausibility checks in pf_config_get_uint32 2024-09-18 11:47:01 +02:00
Armin Novak 7b8ddb89c7
[codec,planar] fix parameter type of functions 2024-09-18 11:47:01 +02:00
Armin Novak d55dfa316f
[server,proxy] fix unchecked return 2024-09-18 11:47:01 +02:00
Armin Novak 58ea63fd84
[winpr,path] fix comparison of unsigned < 0 2024-09-18 11:47:01 +02:00
Armin Novak deec4df8c0
[proxy,module] move list in dyn-channel-dump instead of copy 2024-09-18 11:46:56 +02:00
Martin Fleisz e6b4bb0e76
Merge pull request #10627 from llyzs/rpc
[core,gateway] migrate rpc gateway to use new transport layer.
2024-09-18 09:58:07 +02:00
akallabeth e2fbab750b
Merge pull request #10625 from akallabeth/bsd-fix
[winpr,library] implement GetModuleFileNameA
2024-09-18 09:45:23 +02:00
Vic Lee 5f37b54847 [core,gateway] migrate rpc gateway to use new transport layer. 2024-09-18 15:39:34 +08:00
akallabeth b738cf01b9
Merge pull request #10626 from akallabeth/mac-bundle-fix
[build,mac] require cJSON
2024-09-17 21:13:49 +02:00
akallabeth b62249402a [build,mac] require cJSON
we build with cJSON, so enforce it during build. Prevents other
installed libraries to be considered.
2024-09-17 20:23:11 +02:00
akallabeth 347ac5a941
[winpr,library] implement GetModuleFileNameA 2024-09-17 18:01:10 +02:00
akallabeth 4d8a3a22e2
Merge pull request #10622 from akallabeth/warn-fx
[warnings] fix shorten-64-to-32
2024-09-17 17:13:33 +02:00
akallabeth 586f40631f
[warnings] fix shorten-64-to-32 2024-09-17 16:13:48 +02:00
akallabeth 6fb3120c0b
[clang-tidy] disable modernize-avoid-c-arrays
same as with similar hicpp and cppcoreguidelines check disable for our
project
2024-09-17 16:13:33 +02:00
akallabeth accb4eae75
Merge pull request #10621 from akallabeth/warn-fx
Warn fixes
2024-09-17 13:24:00 +02:00
akallabeth 9278a0adb8
[clang-tidy] fix typo in deactivated check 2024-09-17 12:58:13 +02:00
akallabeth 0e97a51181
[build,mac] disable CHANNEL_RDPEAR
we don't have a MIT-KRB5 library ready on mac os, disable for the time
being.
2024-09-17 12:57:45 +02:00
akallabeth 618e02a65e
[cmake] fix SWScale library variable name 2024-09-17 12:57:43 +02:00
akallabeth 7f52be7d75
[codec,dsp] fix build WITH_FAAC 2024-09-17 12:57:40 +02:00