Armin Novak
7de0a5bba4
[winpr] fix various return checks
2026-03-02 18:39:42 +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
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
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
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
Armin Novak
81d6ed2784
[winpr,path] modify GetCombinedPath
...
Allow the subPath argument to be a format string with variadic
arguments. This allows to generate a subPath on the fly. This change is
API compatible.
2026-01-29 22:47:30 +01:00
akallabeth
fb8efd45f2
[c,format] fix format string and review warnings
2026-01-16 13:36:14 +01:00
akallabeth
34daff7b35
[c,printf] fix wlog format string to match arguments
2026-01-16 11:43:04 +01:00
Armin Novak
e5af1cf1d6
[clang,warnings] fix Wjump-misses-init
2026-01-08 11:32:45 +01:00
akallabeth
abbee49ef5
[winpr,path] fix endianness issues
2025-09-19 18:35:03 +02:00
Armin Novak
ff23fc53dd
[winpr,path] fix missing length check
2025-09-04 10:36:08 +02:00
akallabeth
dd7d3841e9
[winpr,path] fix big endian issues with path
2025-09-02 09:19:28 +02:00
Armin Novak
07e39ede20
[winpr,file] Add winpr_CreateFile wrapper
...
Allows creation of a file HANDLE from a utf-8 name
2025-06-05 11:58:47 +02:00
Armin Novak
b5b258c9f4
[winpr,path] fix NULL arguments for DeleteFile
2025-06-05 11:58:47 +02:00
Armin Novak
bcbf72ea99
[winpr,path] fix windows unicode paths
2025-06-05 11:58:47 +02:00
akallabeth
a520f845a3
[warnings] fix -Wunused-macro
...
comment or delete macros that were not used.
2025-02-26 22:12:18 +01:00
akallabeth
76c2944d99
[winpr,warnings] fix -Wunused-parameter
2025-02-13 15:53:51 +01:00
Armin Novak
f53cd51517
[winpr,path] fix missing includes
2025-02-13 14:43:28 +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
Biswapriyo Nath
19b2a930bd
winpr: Fix compiler error with SHGetKnownFolderPath argument
...
This commit fixes the following gcc compiler error.
FreeRDP/winpr/libwinpr/path/shell.c:226:67: error: passing argument 3 of
'SHGetKnownFolderPath' makes pointer from integer without a cast [-Wint-conversion]
226 | if (FAILED(SHGetKnownFolderPath(&FOLDERID_ProgramData, 0, -1, &wpath)))
| ^~
| |
| int
2024-12-07 17:51:43 +00:00
akallabeth
faae38120c
[cmake,format] reformat all cmake files
2024-11-27 20:41:48 +01:00
akallabeth
f1e4b30507
clang-format after spellcheck changes
2024-11-21 09:53:00 +01:00
stephanebill
4f2afa8c47
spell check with codespell
2024-11-20 16:53:40 -05:00
akallabeth
78acedb40e
[warnigns] fix Wshorten-64-to-32
2024-11-11 10:22:37 +01:00
akallabeth
a3aa01214c
[resource root] unify locations
...
unify resource locations in case WITH_BINARY_VERSIONING is set.
2024-10-25 11:40:40 +02: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
2e73ead996
[c stdlib] replace strlen/strcpy/strcmp
...
Use length checking versions if possible. Also replaces the wide
character versions and TCHAR versions
2024-10-15 16:30:13 +02:00
Armin Novak
276e3d67e0
[winpr,path] add a function to get WinPR config file paths
2024-10-02 23:27:53 +02:00
Armin Novak
ac0acd0463
[winpr,path] add KNOWN_PATH_SYSTEM_CONFIG_HOME
2024-10-02 23:27:49 +02:00
Armin Novak
58ea63fd84
[winpr,path] fix comparison of unsigned < 0
2024-09-18 11:47:01 +02:00
akallabeth
586f40631f
[warnings] fix shorten-64-to-32
2024-09-17 16:13:48 +02:00
akallabeth
0d5bc92a2b
[warnings] fix apple iOS/macos
2024-09-15 19:47:13 +02:00
akallabeth
e756c90569
[warnings] clang-tidy suppress warnings
...
* Suppress NOLINT(bugprone-suspicious-include)
* Suppress __STDC_WANT_LIB_EXT1__ 1 // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
2024-08-30 22:03:47 +02:00
akallabeth
1dea19ac5f
[warnings] clang-tidy suppress warnings
...
* Suppress NOLINT(bugprone-suspicious-include)
* Suppress __STDC_WANT_LIB_EXT1__ 1 // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
2024-08-30 16:01:11 +02:00
akallabeth
ba9897f8b7
[warnings] replace rand() function use
2024-08-29 17:13:53 +02:00
akallabeth
6a3564407e
[warnings] fix clang-tidy issues in winpr
2024-08-29 15:20:39 +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
e063d26bfe
[coverity] 1543053 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
843ecfc01a
[coverity] 1543172 Pointer to local outside scope
2024-04-11 12:04:07 +02:00
Armin Novak
18612bb513
[mingw] fix missing shlwapi link
2024-04-02 09:31:55 +02:00
akallabeth
678ff144ab
[cmake] unify windows resource file generation
...
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +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
Armin Novak
9575f386cd
fixed WCHAR constants, use endian safe definitions
2023-12-20 09:03:58 +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