Charles Kerr
af339a15ed
refactor: remove deep logging ( #2749 )
...
* refactor: remove "deep logging"
2022-03-09 23:51:14 -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
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
3036a76beb
fix: sonarcloud code smells ( #2421 )
2022-01-17 12:39:50 -06:00
Charles Kerr
42b1362760
refactor: tidy libtransmission includes ( #2316 )
2021-12-15 15:25:42 -06:00
Charles Kerr
e2be142ad6
fix: new warnings ( #2270 )
...
* fix: avoid potential resource leak in metainfo test
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205022335&defectInstanceId=52337396&mergedDefectId=1494638
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX2MsJ_lWODkx6cuASq6&open=AX2MsJ_lWODkx6cuASq6
* fix: omit-redundant-override-specifier warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX2MsJ5GWODkx6cuASq5&open=AX2MsJ5GWODkx6cuASq5
* fix: improper-use-of-negative-value warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020121&defectInstanceId=52337394&mergedDefectId=1494639
* fix: unchecked return value warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020168&defectInstanceId=52304887&mergedDefectId=1491438
* fix: potential-divide-by-zero warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020106&defectInstanceId=52337395&mergedDefectId=1494438
2021-12-05 21:12:21 -06: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
a127826d76
refactor: cppcoreguidelines-init-variables pt. 11 ( #2012 )
...
* refactor: uninit vars in bandwidth.cc
* refactor: uninit vars in cache.cc
* refactor: uninit vars in fdlimit.cc
* refactor: uninit vars in inout.cc
* refactor: uninit vars in platform.cc
* refactor: uninit vars in log.cc
* refactor: uninit vars in tr-utp.cc
* refactor: uninit vars in stats.cc
* refactor: uninit vars in trevent.cc
* refactor: uninit vars in session-id.cc
* fixup! refactor: uninit vars in cache.cc
* refactor: uninit vars in upnp.cc
* refactor: uninit vars in file.cc
* refactor: uninit vars in tr-lpd.cc
* refactor: uninit vars in tr-udp.cc
2021-10-23 10:43:15 -05:00
Charles Kerr
16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers ( #1980 )
2021-10-17 15:17:18 -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