Markus Elfring

Results 791 issues of Markus Elfring

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to [increase the usage of augmented assignment statements](https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements "Augmented assignment statements") accordingly....

The functions "[lagopus_msg_info](https://github.com/lagopus/lagopus/blob/6aeec65566cb7f6b2a2f5b42acfa0b37ca664445/src/include/lagopus_logger.h#L275)" and "[exit](http://pubs.opengroup.org/onlinepubs/9699919799/functions/exit.html)" do not belong to the list of [async-signal-safe functions](https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers). I guess that a different program design will be needed for [your functions "s_posix_sighandler" and "s_signal_quit"](https://github.com/lagopus/lagopus/blob/6aeec65566cb7f6b2a2f5b42acfa0b37ca664445/src/lib/check/check8.c#L39).

I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing. Would you like to add more error...

I would like to point out that identifiers like "[`__LAGOPUS_APIS_H__`](https://github.com/lagopus/lagopus/blob/6aeec65566cb7f6b2a2f5b42acfa0b37ca664445/src/include/lagopus_apis.h#L18)" and "[`__LAGOPUS_TYPES_H__`](https://github.com/lagopus/lagopus/blob/6aeec65566cb7f6b2a2f5b42acfa0b37ca664445/src/include/lagopus_types.h#L18)" [do not fit](https://www.securecoding.cert.org/confluence/display/cplusplus/DCL32-CPP.+Do+not+declare+or+define+a+reserved+identifier#DCL32-CPP.Donotdeclareordefineareservedidentifier-NoncompliantCodeExample%28HeaderGuard%29) to the expected naming convention of the C++ language standard. Would you like to adjust...

Would you like to add the configuration script "[AX_PTHREAD](http://www.gnu.org/software/autoconf-archive/ax_pthread.html)" to [your build specification](https://github.com/lagopus/lagopus/blob/6aeec65566cb7f6b2a2f5b42acfa0b37ca664445/configure.ac#L144)?

: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....

[Some extra null pointer checks are not needed](https://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first "Free a null pointer anyway or check first?") in a function like [FreeChainMemory()](https://github.com/NBISweden/MrBayes/blob/develop/src/mcmc.c#L4661 "Update candidate").

I would like to point out that identifiers like “[`__BAYES_H__`](https://github.com/NBISweden/MrBayes/blob/ea2712ec4c8f60efacf9c1cc00f11c2f40d3e577/src/bayes.h#L1 "Update candidate")” and “[`__MCMC_H__`](https://github.com/NBISweden/MrBayes/blob/8a53ac7029cd3638e564fb2456cc3315bafbf874/src/mcmc.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...

I would like to point out that an identifier like “[`CXXOPTS__VERSION_MAJOR`](https://github.com/jarro2783/cxxopts/blob/9910095719931f4a1a3be74d3a5d631851474ff8/include/cxxopts.hpp#L51 "Update candidate")” [does eventually 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 compiler implementation.") to...

[Extra null pointer checks are not needed](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like in [the function “greedy_insert”](https://github.com/tudelft3d/3dfier/blob/f9bddfca7380ca03858a387d2d0cb0a499b50dda/src/geomtools.cpp#L396 "Update candidate").