Markus Elfring
Markus Elfring
[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 “Sound::Free”](https://github.com/ColumbusUtrigas/ColumbusEngine/blob/99cac29f4dac86f01cca52760ac4b3e8f69b8d99/Common/Sound/Sound.cpp#L84 "Update candidate").
[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?") in [the destructor for the class “Adafruit_GrayOLED”](https://github.com/adafruit/Adafruit-GFX-Library/blob/d9220ba7d3cb49915f6aca0feef680e3fed0c400/Adafruit_GrayOLED.cpp#L149 "Update candidate").
I would like to point out that identifiers like “[`_ADAFRUIT_GFX_H`](https://github.com/adafruit/Adafruit-GFX-Library/blob/f7db17f3174f32a76ff6329b9656dd4f8667eeff/Adafruit_GFX.h#L1 "Update candidate")” and “[`_GFXFONT_H_`](https://github.com/adafruit/Adafruit-GFX-Library/blob/9b1781b90d06be321e5e176c8120daa783341384/gfxfont.h#L7 "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...
Would you like to add more error handling for return values from functions like the following? * [fclose](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html "Close a stream.") ⇒ [write_logfile](https://github.com/Mozilla-Ocho/llamafile/blob/d228e01d70a7b91bf04dbf63428646f3f173b888/llama.cpp/perplexity/perplexity.cpp#L82) * [malloc](https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html "Memory allocation") ⇒ [AddStringToStringList](https://github.com/Mozilla-Ocho/llamafile/blob/d228e01d70a7b91bf04dbf63428646f3f173b888/llamafile/cuda.c#L233-L247) *...
Would you like to add more error handling for return values from functions like the following? * [malloc](https://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html "Memory allocation") ⇒ [ggml_dyn_tallocr_new](https://github.com/ggerganov/ggml/blob/0cbb7c0e053f5419cfbebb46fbf4d4ed60182cf5/src/ggml-alloc.c#L302-L318) * [strdup](https://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html "Duplicate a string.") ⇒ [ggml_vk_available_devices_internal](https://github.com/ggerganov/ggml/blob/0cbb7c0e053f5419cfbebb46fbf4d4ed60182cf5/src/ggml-kompute.cpp#L239-L254)
I suggest to [use the function specifier "`_Noreturn`"](http://en.cppreference.com/w/c/language/_Noreturn) (or a similar function attribute/annotation) at [some source code places](https://github.com/ChrisDodd/btyacc/blob/bdaaa2ab318d94ea1e602742a4e099296eb59551/defs.h#L350).
Would you like to [replace more defines for constant values](https://github.com/ChrisDodd/btyacc/blob/bdaaa2ab318d94ea1e602742a4e099296eb59551/defs.h#L68) by [enumerations](https://en.wikipedia.org/wiki/Enumerated_type#C_and_syntactically_similar_languages) to stress their relationships?
I suggest to add the key word "const" to the type specifiers for parameters like "filename" (function "[open_error](https://github.com/ChrisDodd/btyacc/blob/bdaaa2ab318d94ea1e602742a4e099296eb59551/defs.h#L353)"). Would you like to apply the advices from [an article](https://en.wikipedia.org/w/index.php?title=Const_%28computer_programming%29#Consequences) to more...
Some functions are [called only by a single source file](https://github.com/ChrisDodd/btyacc/blob/7b61a9cc72cdd00918a4876915cf5c258fd0256a/closure.c#L185). Would you like to [mark them as "`static`"](https://en.wikipedia.org/wiki/Static_%28keyword%29) (and delete declarations from the header file "defs.h")?
[A message like the following](http://stackoverflow.com/questions/742089/warning-the-use-of-mktemp-is-dangerous) can be displayed during the software build process. ``` warning: the use of `mktemp' is dangerous, better use `mkstemp' ``` This open issue can be...