Markus Elfring

Results 791 issues of Markus Elfring

[An extra null pointer check is not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like the following. - [AudioNode](https://github.com/elieserdejesus/JamTaba/blob/cb25e05b40970419d6ba49c1f3a077fe9a8a8a1f/src/Common/audio/core/AudioNode.cpp#L190 "Destructor for AudioNode") - [FFMpegDemuxer::close](https://github.com/elieserdejesus/JamTaba/blob/a8731ac202be091425d38fd03188550681ebc3b2/src/Common/video/FFMpegDemuxer.cpp#L50...

I would like to point out that identifiers like “[`_CACHE_HEADER_`](https://github.com/elieserdejesus/JamTaba/blob/cb25e05b40970419d6ba49c1f3a077fe9a8a8a1f/src/Common/persistence/CacheHeader.h#L1 "Update candidate")” and “[`_JAMTABA_VERSION_`](https://github.com/elieserdejesus/JamTaba/blob/18269f0e1e702dda10d529547569426334135a30/src/Common/loginserver/Version.h#L1 "Another update candidate")” [do not fit](https://www.securecoding.cert.org/confluence/display/cplusplus/DCL51-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL51-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29 "Do not declare an identifier which is reserved for the...

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to [increase the usage of combined operators](https://www.php.net/manual/en/language.operators.assignment.php#language.operators.assignment.arithmetic "Description for assignment operators") accordingly....

Would you like to [add more error handling](https://github.com/uber/h3/blob/36a2cebd1cd292cfcfe171626df666d1885c0f18/src/h3lib/lib/algos.c#L160 "Update candidate: kRing()") for return values from [calls of the function “malloc”](https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html "Memory allocation")?

[Extra null pointer checks are not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like the following. - [NodeImpl](https://github.com/baidu/braft/blob/0a9ec3f5286e345b8319e43eaa2c6de5fc5afbe6/src/braft/node.cpp#L182 "Destructor for NodeImpl") - [SnapshotExecutor](https://github.com/baidu/braft/blob/ba9479b9c2e26b57efd554c046148d978262e779/src/braft/snapshot_executor.cpp#L104 "Destructor...

Would you like to [replace more defines for constant values](https://github.com/canonical/dqlite/blob/6789f6c9518ff80f7f61627ab40f309c4ba5045b/src/protocol.h#L28 "Update candidate") by [enumerations](https://en.wikipedia.org/wiki/Enumerated_type#C_and_syntactically_similar_languages "Description for enumerated types") to stress their relationships?

Easy

I would like to point out that identifiers like “[`dqlite__run`](https://github.com/canonical/dqlite/blob/57fe41beda6f0c4c689235c0e8a917d6c8b374c2/src/server.h#L45 "Update candidate")” and “[`leader__init`](https://github.com/canonical/dqlite/blob/3b471439236d7b1c25439c18d579b43c3274794c/src/leader.h#L61 "Another update candidate")” [do not fit](https://www.securecoding.cert.org/confluence/display/cplusplus/DCL51-CPP.+Do+not+declare+or+define+a+reserved+identifier "Do not declare an identifier which is reserved for the...

Bug

[An extra null pointer check is not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like the following. - [MainWindow::showParametersFromList](https://github.com/IFL-CAMP/supra/blob/54e0bfa07e54cde18d6da83201302093ddc6aed9/src/GraphicInterface/mainwindow.cpp#L223 "MainWindow::showParametersFromList function") - [removeElements](https://github.com/IFL-CAMP/supra/blob/6b21dd5414661478aa127f5ada420630e7db3070/src/GraphicInterface/parameterWidget.h#L138 "removeElements...

[An extra null pointer check is not needed in a function](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like [the destructor for the class “GeometricShape”](https://github.com/diegomacario/Super-Sunshine/blob/c2e68e6ebf6e70d620b7952620cdb6717c2fb2ff/src/GeometricShape.cpp#L15 "Update candidate").

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to [increase the usage of combined operators](https://perldoc.perl.org/perlop#Assignment-Operators "Description for assignment operators") accordingly....