Commit Graph

194 Commits

Author SHA1 Message Date
Armin Novak
b724ba546d [checks,return] fix various unchecked return values 2026-03-03 09:40:27 +01:00
Armin Novak
b1e4933c78 [winpr,clipboard] ClipboardRegisterSynthesizer return checks 2026-03-02 18:32:37 +01:00
Armin Novak
822257bf7c [c23,winpr] replace NULL with nullptr 2026-02-26 21:16:48 +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
6cebb3e0cd [winpr] fix sign warnings 2026-02-24 16:23:15 +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
akallabeth
b186c607eb [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:46 +01:00
akallabeth
60815b1fb7 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:43 +01:00
Armin Novak
f8ac8fb7b6 [c,warnings] fix unterminated string warnings
initialize variables as array to avoid warnings with gcc >= 15 or clang
2026-01-08 11:32:47 +01:00
Armin Novak
bd755236a6 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
Armin Novak
30ce7423c5 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
akallabeth
34ab0b893d [warnings] fix clang-tidy warnings 2025-05-23 15:29:31 +02:00
akallabeth
99619b3392 [warnings] fix stringlength checks 2025-03-26 20:08:13 +01:00
akallabeth
299d06c63c [winpr,clipboard] add image to html synthesizers 2025-03-19 12:49:09 +01:00
akallabeth
253b2b71a2 [winpr,clipboard] add logging to Clipboard[GS]etData 2025-03-14 08:48:57 +01:00
akallabeth
beae583dbd [winpr,clipboard] fix image conversion routines
properly define guard the functions to be available for all combinations
of image formats (un)supported
2025-03-14 08:48:55 +01:00
akallabeth
1fe0ca41e1 [warnings] fix missing integer casts 2025-03-11 13:20:19 +01:00
akallabeth
d4f7fb081b [warnings] fix -Wunused-function
* delete unused functions that are no longer required
* define guard functions only used while debugging
2025-02-27 19:29:46 +01:00
akallabeth
5b9a1b5b1f [winpr,clipboard] define guard DIBv5 support 2025-02-27 08:33:39 +01:00
akallabeth
5732277c09 [winpr,clipboard] add warnings for missing implementation
warn if image conversion routines are called with formats not yet
implemented
2025-02-27 06:15:01 +01:00
akallabeth
76c2944d99 [winpr,warnings] fix -Wunused-parameter 2025-02-13 15:53:51 +01:00
akallabeth
4013b3132b [clang,tidy] fix sign warnings 2025-02-10 13:11:16 +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
951cfd06bc [winpr,clipboard] fix possible resource leak 2024-12-09 10:07:14 +01:00
akallabeth
344841714c Merge pull request #10844 from akallabeth/cmake-mulitconfig
Cmake multiconfig
2024-12-07 17:43:05 +01:00
Armin Novak
f278e8730d [winpr,clipboard] fix Wshorten-64-to-32 2024-12-06 09:15:51 +01:00
akallabeth
ba8fd2ada5 [cmake] force configuration options
limit multiconfiguration options to supported types
2024-12-05 09:36:23 +01:00
akallabeth
be6c108189 [winpr,clipboard] follow up to #10901
CF_UNICODETEXT is UCS-2 encoded, so determine string length with
_wscnlen, the other string types are in local encoding which requires
strnlen
2024-12-03 11:40:53 +01:00
akallabeth
9cc79f3797 [winpr,clipboard] fix SetClipboardData
* calloc an additional byte to add (possibly) missing zero termination
* For string types determine length by strnlen
2024-11-30 16:40:24 +01:00
akallabeth
faae38120c [cmake,format] reformat all cmake files 2024-11-27 20:41:48 +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
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
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
28037f100c [warnings] fix sign comparison issues 2024-10-22 10:11:38 +02:00
akallabeth
67817886ab [winpr,clipboard] fix integer narrow 2024-10-03 18:58:13 +02:00
akallabeth
965d231e49 [return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
f74fd1ab0f [warnings] silence unused macro warnings
* Add WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO
* Silence usages that
2024-09-12 13:30:08 +02:00
akallabeth
fa9fff6ed0 [winpr,clipboard] properly define guard function 2024-09-12 09:09:00 +02:00
akallabeth
8a990644c0 [warnings] fix missing NULL assert/check 2024-09-12 09:08:51 +02:00
akallabeth
b980bf2e14 [winpr,clipboard] use endian safe bitmap read/write 2024-09-04 21:56:44 +02:00
akallabeth
ebbfe598dc [winpr,utils] unify bitmap reading
* clipboard synthesizer needs to read the bitmap header, use the function
  from utils/image
* check bitmap header in utils/image and abort if wrong
2024-09-04 09:07:18 +02:00
akallabeth
72ae7fb54f [nolint] add cert-dcl37-c,cert-dcl51-cpp 2024-09-03 12:24:48 +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
7dfdadbe53 [winpr,clipboard] add image clipboard tests 2024-08-19 11:50:07 +02:00
akallabeth
71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
Armin Novak
7f896b649e [winpr,clipboard] fix resource leak 2024-04-17 18:47:16 +02:00