Commit Graph

86 Commits

Author SHA1 Message Date
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
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
f69e1fe697 [clang-tidy] readability-duplicate-include 2024-02-15 11:49:16 +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
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
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
akallabeth
92d3e3c64a [winpr] use WINPR_ prefix for conditional includes 2023-01-10 17:38:00 +01:00
akallabeth
5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
Armin Novak
6ed50b4b1d Refactored WinPR includes 2022-03-03 11:26:48 +01:00
akallabeth
c99c4cecdd Fixed GetEnvironmentVariableX: Return sting length including '\0' 2022-03-03 08:15:28 +01:00
akallabeth
952068145e Fixed GetEnvironmentVariableX win32 call to ConvertFromUnicode 2022-03-03 08:15:28 +01:00
akallabeth
aef3cb16fa Fixed GetEnvironmentVariableX for windows 2022-03-03 08:15:28 +01:00
David Fort
fa1656178a Fix a leak in GetEnvironmentVariableX under win32
The variable name was leaked.
2022-03-03 08:15:28 +01:00
Marc-André Moreau
55be5f8bb0 Fix Windows Unicode handling of environment variables 2022-01-11 12:32:14 +01:00
Armin Novak
ba0da04217 Fixed compilation warnings and duplicate defines 2021-09-09 08:53:20 +02:00
Armin Novak
5eea7fc12d WINPR_UNUSED argc, argv for unit tests 2021-08-24 10:45:57 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
6726772d8d Fixed integer warnings 2021-06-18 09:41:02 +02:00
Armin Novak
d9a8083ddf Added WINPR_NORETURN, fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
1af7ef2f1b Fixed compilation warnings and typos 2021-06-16 15:21:56 +02:00
Armin Novak
53f7d023b1 Fixed GetEnvironmentStrings test
Some os return an invalid/wrong character count if a string with
unknown symbols is printed to stdout.
Instead use the sprintf family and print to a buffer / determine
the required buffer size.
2019-11-21 15:05:57 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
b06efc78ec Fixed warnings from TestEnvironmentGetEnvironmentStrings 2019-10-29 12:58:06 +01:00
Armin Novak
f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
asapelkin
82eadad4a4 Fix some static analizer warnings 2019-10-22 15:39:54 +02:00
Armin Novak
e42b15eb05 Fixed memory leak 2019-05-08 15:13:03 +02:00
Armin Novak
279a5fe39f Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
2bd43398e8 Fixed sign-compare warning 2019-01-30 18:05:49 +01:00
Armin Novak
7305828122 Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Armin Novak
99c45405cb Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00
Armin Novak
9c64e77a84 Disabled thread local storage on iOS.
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
Norbert Federa
e718fb324b fix race conditions, tests and some invalid return values
Since the current winpr implementation for overlapped operations is
incomplete and buggy, all affected functions will now fail if they are
called with a set FILE_FLAG_OVERLAPPED flag or a non-null pointer to
a OVERLAPPED structure.

winpr/nt:
- use proper one-time initialization on win32
- fix TestNtCreateFile
- fix broken/incomplete _RtlAnsiStringToUnicodeString
- unimplemented functions return appropriate error codes

winpr/pipe:
- improved TestPipeCreateNamedPipe
- rewrite the completely broken TestPipeCreateNamedPipeOverlapped test

rdtk:
- improve test and don't blindly return success

winpr/synch:
- fix race condition in TestSynchTimerQueue

winpr/ssspi:
- fix TestEnumerateSecurityPackages printf output
- fix TestQuerySecurityPackageInfo printf output

winpr/environment:
- fix GetEnvironmentStrings printf output

winpr/comm:
- unimplemented functions return appropriate error codes

winpr/io:
- unimplemented functions return appropriate error codes

winpr/thread:
- implement SwitchToThread() via sched_yield()
2016-06-01 16:26:26 +02:00
Marc-André Moreau
ceefc4b099 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-07 10:19:50 -05:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Marc-André Moreau
d0f413db12 winpr: initial port to Universal Windows Platform (UWP) 2016-02-05 16:28:45 -05:00
Bernhard Miklautz
c70559d128 winpr API: add EnvironmentBlockToEnvpA
* expose EnvironmentBlockToEnvpA
* cleanup includes in process.c
* removed unused "flag" variable in _CreateProcessExA
* make ProcessHandleCloseHandle static
2015-10-23 18:38:42 +02:00
MartinHaimberger
d4d360f6a4 Merge pull request #2859 from akallabeth/resource_leak_fix
Fixes API misuse and logic errors
2015-09-15 14:45:42 +02:00
Bernhard Miklautz
6b52a2e5cc winpr/file: initial regular file support
Add initial support for "regular" files. First implemented call is
GetStdHandle to get stdin/stdout/stderr.
2015-09-09 16:47:03 +02:00
Armin Novak
ce479e312a Fixed uninitialized environment block. 2015-09-03 13:37:16 +02:00
Armin Novak
6c74dbbe25 Reverted broken malloc size fix. 2015-09-02 13:57:04 +02:00
Armin Novak
6c288bd0f2 Fixed zero length allocation. 2015-09-01 12:25:43 +02:00
Armin Novak
205878383d Fixed array out of bound access. 2015-09-01 12:25:43 +02:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Bernhard Miklautz
850de59b55 winpr: add checks for *alloc
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
2015-04-08 11:34:37 +02:00
Zhang Zhaolong
ea67d8b1bc libwinpr: fix lost of mergeStrings.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-13 10:38:07 +08:00