Charles Kerr
468de87076
refactor: fix cppcoreguidelines-avoid-do-while warnings ( #6527 )
...
* fix: avoid do-while in tr_sys_file_lock()
* fix: avoid do-while in BitfieldTest
* chore: set cppcoreguidelines-avoid-do-while.IgnoreMacros
* fix: avoid do-while in FileList::Impl::onRowActivated()
* fix: avoid do-while in tr_spawn_async_in_parent()
* fix: avoid do-while in handle_sigchld()
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
* fixup! fix: avoid do-while in FileList::Impl::onRowActivated()
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
fix fd leak regression
* fixup! fix: avoid do-while in tr_spawn_async_in_parent()
2024-01-20 16:56:42 -06:00
Charles Kerr
581d9c34cc
fix: gcc-13 warnings pt. 2 ( #6404 )
...
* fix: tr_priority_t usage warnings
* build: disable -Wnull-dereference warnings when building GTest
* fix: -Wunused-result warning in tr_spawn_async()
* fix: -Warray-bounds warning in NetTest::compact4()
2023-12-23 10:32:04 -06:00
Charles Kerr
64d9d57363
chore: fix minor clang-tidy warnings ( #6275 )
2023-11-21 09:02:03 -06:00
Charles Kerr
a952a0731f
refactor: remove the tr_error** idiom ( #6198 )
...
* refactor: remove the tr_error** idiom
* fix: tr_error::message() is only constexpr in c++20 and up
* chore: silence a couple of g++-12 Wshadow warnings
2023-11-04 11:39:41 -05:00
Julien
8ac323d5d6
chore: removed copyright timespans in headers ( #4850 )
2023-11-01 16:11:11 -05:00
tearfur
5ec4ca550e
chore: iwyu ( #5746 )
2023-07-08 10:24:03 -05:00
Charles Kerr
7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h ( #5404 )
2023-04-16 15:34:19 -05:00
Charles Kerr
d72cb67cfb
chore: include directory name in libtransmission #includes ( #5308 )
2023-04-14 14:33:23 -05:00
Charles Kerr
cb10255ef1
refactor: misc-use-anonymous-namespace pt. 4 ( #4550 )
2023-01-07 12:58:16 -06:00
Charles Kerr
326d9f3daf
refactor: cppcoreguidelines-avoid-goto ( #3841 )
...
* refactor: do not use goto in file-win32.cc
* refactor: do not use goto in subprocess-posix.cc
* refactor: do not use goto in peer-io.cc
* build: add cppcoreguidelines-avoid-goto to libtransmission/.clang-tidy
2022-09-23 08:39:13 -05:00
Charles Kerr
a24679d89f
refactor: modernize-avoid-c-arrays pt. 2 ( #3713 )
2022-08-26 13:35:28 -05:00
Charles Kerr
4bc1589c5d
refactor: remove tr_win32_utf8_to_native_ex() ( #3590 )
2022-08-05 14:16:25 -05:00
Charles Kerr
e4461c48d7
refactor: prefer FMT_STRING ( #2845 )
...
* use FMT_STRING in libtr client on non-i18n strings
This gives compile-time safety checks.
2022-03-30 14:59:13 -05:00
Charles Kerr
ebb2ab6aee
chore: update license spdx abbreviations ( #2582 )
...
Use SPDX license list 3.0 terminology: replace deprecated identifiers
GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
2022-02-07 10:25:02 -06:00
Charles Kerr
ecef0feb0c
refactor: clang-tidy in libtransmission ( #2578 )
...
* chore: enable cppcoreguidelines-slicing warning
* chore: enable readability-named-parameter warning
* chore: enable bugprone-reserved-identifier check
* chore: enable bugprone-not-null-terminated-result check
* chore: enable bugprone-sizeof-expression check
* chore: enable bugprone-incorrect-roundings check
* chore: enable misc-misplaced-const check
* chore: enable bugprone-suspicious-include check
* chore: enable bugprone-signed-char-misuse check
* chore: enable modernize-raw-string-literal check
* chore: enable readability-static-accessed-through-instance check
* chore: enable readability-implicit-bool-conversion check
* fixup! Merge branch 'main' into refactor/clang-tidy
2022-02-06 22:28:36 -06:00
Charles Kerr
e51527203e
refactor: re-enable clang-tidy warnings ( #2485 )
2022-01-23 16:47:41 -06:00
Charles Kerr
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
b0ee4007ff
refactor: include cleanups ( #2392 )
...
* refactor: include <memory> when using shared_ptr or unique_ptr
* refactor: include <cstdio> iff we use it
* refactor: include <cstring> iff we use it
* refactor: include <cstdlib> iff we use it
* refactor: include <string_view> or <string> iff we use it
* refactor: include <array> iff we use it
* refactor: include <ctime> iff we use it
* refactor: include <cctype> iff we use it
* refactor: misc #include cleanups in libtransmission
2022-01-12 20:13:58 -06:00
Charles Kerr
02aa2f46d4
refactor: don't use varargs in tr_error ( #2352 )
2021-12-27 20:32:22 -06:00
Charles Kerr
42b1362760
refactor: tidy libtransmission includes ( #2316 )
2021-12-15 15:25:42 -06:00
Charles Kerr
dbd9130d9d
fix: env var leak in tr_spawn_async() ( #2212 )
...
* fix: env var leak in tr_spawn_async()
2021-11-24 13:25:23 -06:00
Charles Kerr
f270d6081c
refactor: cppcoreguidelines-init-variables pt. 15 ( #2055 )
...
* refactor: uninit vars in subprocess-posix
* refactor: uninit vars in handshake
* refactor: uninit vars in file-posix
* refactor: uninit vars in platform-quota
2021-10-29 17:43:25 -05:00
Charles Kerr
6bd229fcfd
fix: clang 13 nullptr warnings in libtransmission ( #2054 )
...
* fix: nullptr dereference warning in tr_peerMgrPeerStats
* fix: nullptr dereference warning in refillUpkeep()
* fix: nullptr dereference warning in tr_peerIsSeed()
* fix: nullptr dereference warning in rechokeUploads()
* fix: nullptr dereference warning in tr_variantDictAdd
* fix: nullptr dereference warning in tr_ioFindFileLocation()
* fix: nullptr dereference warning in tr_spawn_async_in_child()
* fix: nullptr dereference warning in calculatePiecePriority()
2021-10-27 20:16:24 -05:00
Charles Kerr
c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used ( #2033 )
...
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr
c6501c655c
refactor: add performance-* to libt .clang-tidy ( #1981 )
2021-10-17 16:09:58 -05:00
Charles Kerr
16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers ( #1980 )
2021-10-17 15:17:18 -05:00
Charles Kerr
f0171668c6
refactor: use C++ static_assert; remove TR_STATIC_ASERT ( #1959 )
2021-10-14 15:40:35 -05:00
Charles Kerr
1fb5a79813
refactor: use maybe unused attribute ( #1918 )
...
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Dmytro Lytovchenko
43d1ece562
C++ modernization: Replace NULLs with typesafe nullptrs ( #1799 )
...
Fixing CI errors and build errors
Reverted changes: NULL in EV_SET macro; Clang-formatting
Reverted changes: MacosX *.m files reverted from master
2021-09-14 19:18:09 -05:00
Charles Kerr
4c1b627647
refactor: port libtransmission to C++ ( #1787 )
...
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization
patches!
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00