[mythtv-commits] [MythTV/mythtv] 1b75b3: cppcheck: Fix another null pointer dereference war...
David Hampton
noreply at github.com
Thu Jan 5 23:26:39 UTC 2023
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 1b75b3fbc7da51c0ed0b885e21bc158564bb0713
https://github.com/MythTV/mythtv/commit/1b75b3fbc7da51c0ed0b885e21bc158564bb0713
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythui/mythdialogbox.cpp
Log Message:
-----------
cppcheck: Fix another null pointer dereference warning.
Commit: e09768d8e397f1e5eed6a132da1d149fd31bf4f3
https://github.com/MythTV/mythtv/commit/e09768d8e397f1e5eed6a132da1d149fd31bf4f3
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythtv/recorders/vbitext/vbi.cpp
Log Message:
-----------
cppcheck: Suppress "memory leak" warning in vbi.cpp.
Commit: a8f3d5131bf2b25ffaa83c54808e490e92c5c80a
https://github.com/MythTV/mythtv/commit/a8f3d5131bf2b25ffaa83c54808e490e92c5c80a
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythui/mythmainwindow.cpp
M mythtv/libs/libmythui/mythuitype.cpp
Log Message:
-----------
cppcheck: Fix "dereference of an invalid iterator" warnings.
These loops currently iterate from "end()-1" to "begin()-1", which
attempts to reference the nonexistent iterator that comes before
"begin()". This code is a crude attempt to iterate lists in the
reverse order (although reverse iterators may not have existed at the
time the code was written). Converting these loops to use reverse
iterators eliminates the errors.
The validity of this solution was checked by temporarily using both
solutions, and printing out item address to confirm that both loops
walked the list in the same order.
Commit: ed4365995955410bd0868ffb300674e12f612296
https://github.com/MythTV/mythtv/commit/ed4365995955410bd0868ffb300674e12f612296
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythupnp/servicehost.cpp
Log Message:
-----------
cppcheck: Fix "no current exception to rethrow" warnings.
These two locations aren't in "catch" clauses, so there definitely
isn't anything to rethrow. To prevent the system from calling
std::terminate, give these two locations something to throw.
Commit: 270b4f28189d7f7f423801bb1a3f0bfe68a819e3
https://github.com/MythTV/mythtv/commit/270b4f28189d7f7f423801bb1a3f0bfe68a819e3
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/programs/mythbackend/filetransfer.cpp
M mythtv/programs/mythbackend/filetransfer.h
M mythtv/programs/mythbackend/mainserver.cpp
M mythtv/programs/mythbackend/mainserver.h
Log Message:
-----------
cppcheck: Fix "one definition rule" is violation for FileTransfer.
This class is defined in two different locations:
libs/libmythprotoserver/sockethandler/filetransfer.h
programs/mythbackend/filetransfer.h
Eliminate the error by changing the class name in mythbackend to
BEFileTransfer.
https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule
Commit: e523a59c0906b0ee7fa4c0d5f4459973df067f34
https://github.com/MythTV/mythtv/commit/e523a59c0906b0ee7fa4c0d5f4459973df067f34
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/programs/mythbackend/mainserver.cpp
Log Message:
-----------
cppcheck: Fix "one definition rule" is violation for ProcessRequestRunnable.
This class is defined in two different locations:
libs/libmythprotoserver/mythsocketmanager.cpp
programs/mythbackend/mainserver.cpp
Eliminate the error by changing the class name in mythbackend to
BEProcessRequestRunnable.
https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule
Commit: b91959b9951d5ba08020c2023535fa1c5e0ae4e7
https://github.com/MythTV/mythtv/commit/b91959b9951d5ba08020c2023535fa1c5e0ae4e7
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/programs/mythfilldatabase/filldata.cpp
M mythtv/programs/mythfilldatabase/filldata.h
M mythtv/programs/mythfilldatabase/mythfilldatabase.cpp
Log Message:
-----------
cppcheck: Fix "one definition rule" is violation for Source.
This class is defined in two different locations:
libs/libmythtv/channelsettings.cpp
programs/mythfilldatabase/filldata.h
Eliminate the error by changing the class name in mythfilldatabase to
DataSource. Also change SourceList->DataSourceList to keep the
symmetry of naming.
https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule
Commit: 5df7f4fbd3288090253cdb11eff4b24c5b1d3ec6
https://github.com/MythTV/mythtv/commit/5df7f4fbd3288090253cdb11eff4b24c5b1d3ec6
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythplugins/mytharchive/mytharchive/remoteavformatcontext.h
M mythplugins/mytharchive/mytharchive/thumbfinder.h
M mythplugins/mytharchive/mytharchivehelper/mytharchivehelper.cpp
Log Message:
-----------
cppcheck: Fix "one definition rule" is violation for RemoteAVFormatContext.
This class is defined in two different locations:
mytharchive/mytharchive/remoteavformatcontext.h
mythmusic/mythmusic/remoteavformatcontext.h
These two implementations are mostly identical, but there are some
customizations to one of them. Eliminate the error by changing the
class name in mytharchive to ArchiveRemoteAVFormatContext.
https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule
Commit: 0fd0ea04f47aff31e8ac5c5677b98fd3140c6379
https://github.com/MythTV/mythtv/commit/0fd0ea04f47aff31e8ac5c5677b98fd3140c6379
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythtv/channelinfo.cpp
Log Message:
-----------
cppcheck: Fix "variable not assigned" in ChannelInfo assignment operator.
Added the missing variable.
Commit: 43f16b1c6c5c698913b609ae8e448d8db89c5bc0
https://github.com/MythTV/mythtv/commit/43f16b1c6c5c698913b609ae8e448d8db89c5bc0
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythui/mythuiimage.cpp
Log Message:
-----------
cppcheck: Disable warning for ImageProperties assignment operator.
Disable this warning because the variable is question is always
assigned in a function that is called by the assignment operator
function.
Commit: 4fa0592c05c7ea6014de04ed28444845639d31c8
https://github.com/MythTV/mythtv/commit/4fa0592c05c7ea6014de04ed28444845639d31c8
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythui/mythdialogbox.cpp
M mythtv/libs/libmythui/mythdialogbox.h
Log Message:
-----------
cppcheck: Fix several "use initialization list" warnings in mythdialogbox.
Move the entire body of the function to the initialization list, and
then move the entire thing to the header file since its just one big
initialization. Several of the values were converted to default member
initialization values.
clang-tidy suggested the use of std::move.
Commit: dcf2a2be562952fc46bfc7f67a8496def036dcd3
https://github.com/MythTV/mythtv/commit/dcf2a2be562952fc46bfc7f67a8496def036dcd3
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythui/mythuitextedit.cpp
M mythtv/libs/libmythui/mythuitextedit.h
Log Message:
-----------
cppcheck: Fix several "use initialization list" warnings in mythuiedittext.
Instead of moving these assigned values to the function initialization
list, make them the default member initialization values.
Commit: ae522e1d7b36d9d097fff91d061db382c30f837d
https://github.com/MythTV/mythtv/commit/ae522e1d7b36d9d097fff91d061db382c30f837d
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
Log Message:
-----------
cppcheck: Fix several "use initialization list" warnings in dvbci.
Instead of moving these assigned values to the function initialization
list, make them the default member initialization values.
Commit: a6e851cfe784db593e211b958e983afa0072704c
https://github.com/MythTV/mythtv/commit/a6e851cfe784db593e211b958e983afa0072704c
Author: David Hampton <mythtv at love2code.net>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M mythtv/libs/libmyth/langsettings.cpp
M mythtv/libs/libmythmetadata/musicmetadata.cpp
M mythtv/libs/libmythui/mythgenerictree.cpp
M mythtv/libs/libmythui/mythgenerictree.h
M mythtv/libs/libmythui/mythuiclock.cpp
M mythtv/libs/libmythui/mythuiimage.cpp
Log Message:
-----------
cppcheck: Fix various "use initialization list" warnings.
Move these variable assignments into the initialization list. Remove
a couple of initializers that duplicate the default member values.
clang-tidy suggested the use of std::move.
Compare: https://github.com/MythTV/mythtv/compare/b85f9836ecc5...a6e851cfe784
More information about the mythtv-commits
mailing list