akallabeth
3c8cd7fb7e
[winpr,assert] add WINPR_ASSERT_AT
...
Add a version of assert that allows setting the location (useful for
macros or static functions wrapping something where the location of the
call is more significant than the function the macro was used in)
2024-11-14 13:26:16 +01:00
akallabeth
9e15af8850
[winpr,assert] fix coverity pragma
...
rewrite pragma according to https://community.blackduck.com/s/article/Suppressing-False-Positive-Intentional-defects
2024-11-12 16:46:13 +01:00
akallabeth
c5711f0a2e
[winpr,assert] coverity suppress CONSTANT_EXPRESSION_RESULT
2024-11-08 08:40:28 +01:00
Martin Fleisz
1520d94d33
Merge pull request #10797 from akallabeth/warn-fixes
...
Warn fixes
2024-11-07 13:50:51 +01:00
akallabeth
d070857c03
[winpr,string] add wcsndup
2024-11-07 11:46:55 +01:00
akallabeth
3a1251fa0e
[winpr,path] WINPR_ATTR_MALLOC for winpr_GetConfigFilePath
2024-11-07 11:46:53 +01:00
akallabeth
a5b64effab
[winpr,stream] add functions to write INT16_BE and INT32_BE
2024-10-30 19:18:04 +01:00
akallabeth
8bb5d598fc
[winpr,stream] fix missing comma
2024-10-30 17:10:03 +01:00
akallabeth
dc76879e0b
[warnings] fix some compiler warnings
...
* fix compiler warnings found in a lot of places
* add missing enum type for clipboard channel
* mark deallocator for winpr image function
2024-10-30 16:12:20 +01:00
akallabeth
1eac8fa15e
[winpr,crypto] deprecate winpr_Cipher_New
...
Deprecate function in favor of new winpr_CipherNewEx with explict key
and IV length parameters, adjust test cases to test both.
2024-10-30 13:22:45 +01:00
akallabeth
10e7acdd49
[winpr,stream] add functions to write INT16_BE and INT32_BE
2024-10-29 15:50:05 +01:00
akallabeth
6548f1f9dd
[compiler] disable unknown pragma warnings
...
we compile with different compilers/checkers whith their own #pragma
do not warn us about that, we already know
2024-10-29 15:49:51 +01:00
akallabeth
c513886914
[ci,assert] silence coverity on WINPR_ASSERT
...
silence covertiy NO_EFFECT with _Pragma when using WINPR_ASSERT.
We´ve got a lot of situations where a check is mostly useless when
functions are called correctly, but the check triggers on common errors.
So silence this warning on our perfectly fine usage situations
2024-10-28 08:36:23 +01:00
akallabeth
a60ac2321d
[compiler,macros] fix pragma by compiler support
2024-10-27 21:58:58 +01:00
akallabeth
d19b7fa5d0
Merge pull request #10768 from akallabeth/stream-write-assert
...
[winpr,stream] assert Stream_Write_(U)INT[8|16|32] ranges
2024-10-26 14:40:43 +02:00
akallabeth
11570395bc
[winpr,stream] updated function documentation
2024-10-25 14:36:28 +02:00
akallabeth
0a02afc225
[winpr,assert] silence -Wtautological-value-range-compare
...
assertions sometimes check for values that are not possible (checks in
defines that are used on different types, ...) so silence these
warnings.
2024-10-25 12:04:06 +02:00
akallabeth
04a5bbed4a
[winpr,stream] unify Stream_Fill and Stream_Zero
2024-10-25 11:48:09 +02:00
akallabeth
941c36f4f6
[winpr,stream] assert Stream_Write_(U)INT[8|16|32] ranges
...
* Every function takes a (U)INT64 as argument to avoid shortening the
original value
* The limits are asserted so invalid values can be found during runtime
2024-10-25 11:48:07 +02:00
akallabeth
a27d9508e2
[cmake] unify CFLAGS to string
...
* move to common CMake function
* escape CFLAGS
2024-10-25 11:40:43 +02: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
akallabeth
180a0e6c9e
[winpr,crypto] add functions stringify ciphers
...
* add funtion to get the name of a cipher
* add function to get the cipher from name
* make ciphers an enum
2024-10-24 09:08:11 +02:00
akallabeth
aa9b03df25
[cmake] generate full buildflags.h CFLAGS
...
Combine current configuration flags with CMAKE_C_FLAGS
2024-10-24 09:08:08 +02:00
akallabeth
9caf38bbb6
[warnings] unify CommandLineParseCommaSeparatedValues
...
CommandLineParseCommaSeparatedValues does some internal hack to allow
the allocated char** to be cleaned up by free.
This enforces compiler warnings as the pointer types do not match.
Use a new free function CommandLineParserFree instead
2024-10-22 21:11:58 +02:00
akallabeth
f346b94835
replace SIZE_T with size_t
2024-10-17 12:40:22 +02:00
akallabeth
d870035509
[winpr,pragma] require VS2019 for warning pragma
2024-10-16 20:25:46 +02:00
akallabeth
122aa76ef1
[winpr,macros] Remove check for _STDC_, check only __STDC_VERSION__
2024-10-16 20:04:02 +02:00
akallabeth
96730a0be5
[winpr,macros] move WINPR_RESTRICT and WINPR_DEPRECATED
...
* Move macros from wtypes.h.in to platform.h
2024-10-16 20:03:46 +02:00
akallabeth
d19c0bde21
[winpr] add WINPR_STATIC_ASSERT
2024-10-16 19:06:57 +02:00
akallabeth
32169be68e
[winpr] add WINPR_PRAGMA_WARNING
...
a compiler independent version of #warning
2024-10-16 15:21:20 +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
Martin Fleisz
dcc288c3d1
Merge pull request #10704 from akallabeth/int-narrow-cleanups
...
Int narrow cleanups
2024-10-14 09:51:06 +02:00
Armin Novak
8abf9cbe7c
[winpr] mark GNU macros with __extension__
...
mark GNU and clang definition of macros using statement expressions with
__extension__ to silence warnings. We know the compilers support that
and do not use it with others.
2024-10-09 10:09:43 +02:00
akallabeth
8ea903091b
[winpr,platform] disable GCC pragma
...
GCC does not support -Wtautological-constant-out-of-range-compare
2024-10-04 16:12:03 +02:00
akallabeth
4fc2e1bb3e
[warnings] fix integer narrowing
2024-10-03 21:21:44 +02:00
Martin Fleisz
966ddd13df
Merge pull request #10694 from akallabeth/qa-fixes
...
Qa fixes
2024-10-03 13:09:06 +02:00
akallabeth
cfc37caeb8
[cmake] cleaning_configure_file
...
add a wrapper to automatically add generated files to clean target
2024-10-02 23:28:08 +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
akallabeth
582ff2c319
[winpr,wincrypt] fix a define typo
2024-10-01 13:05:41 +02:00
akallabeth
f6d71a592e
[winpr,assert] silence tautological-constant-out-of-range-compare
...
we do some assertions that can with correct code never trigger. (check
for a unsinged char > 256, ...)
2024-10-01 13:05:39 +02:00
akallabeth
5f9ef68b07
[warnigs] fixed readability-non-const-parameter
2024-10-01 13:05:23 +02:00
akallabeth
fa21806734
[winpr,error] fix sign of NTE_* defines
2024-10-01 13:05:04 +02:00
akallabeth
98e11c69c1
[winpr,ncrypt] add pragma to disable warning
2024-09-30 15:41:34 +02:00
akallabeth
f529345d84
[warnings] fix Wcast-qual
2024-09-30 09:31:36 +02:00
akallabeth
5e998bb078
[winpr,platfom] fix WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO
2024-09-24 20:35:28 +02:00
akallabeth
42e3c6fff8
[winpr,utils] fix winpr_strerror argument types
...
errno is of type int, so use a signed INT32 as argument type to avoid
warings with sign conversions
2024-09-20 10:57:21 +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
8b6091a007
[winpr,wtsapi] improve API usage
...
* Mark WTSVirtualChannelOpen and WTSVirtualChannelOpenEx with
WINPR_ATTR_MALLOC to enforce compiler checks for resource cleanup
* Fix unused result warnings, use the result or cast to (void) where not
requierd
2024-09-14 21:29:31 +02:00