fix: Added checks to functions in order to fix a build error #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a rewrite of my previous PR #75, which addresses more of the uses of
snprintfinstead, of just one call siteWhen I was reading through the calls to
snprintf, I found that most of them actually should never trigger the compiler warning, due to using constant-sized formats, or the strings being printed are of constant size themselves, which the compiler should be able to check.The calls that I replaced are the ones that I deemed most problematic, and where applicable, used similar error handling to other errors.
I would appreciate any comments if the style is off, or you think I missed any special cases!
I can also confirm that this fixes the compile errors for me on my machine