-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion of error handling #77
Comments
For sure. The code can use a good makeover for more defensive programming and avoiding of overflows. Patches welcome. |
Having the source compile with the following compiler settings is a good start:
|
As I see some patches coming in using the GCC attributes, I had a look at some of my projects and saw, that one feature that could be interesting in the long run, might be buffer access tracking:
Basically what these attributes do (applied to a function declaration) is mark the argument at location Example: __attribute__((access(read_only,1,2)))
__attribute__((nonnull(1)))
void foo(const uint8_t* buf, size_t bufsize) {
// …
uint8_t bar = buf[bufsize]; // <- Throws warning
// …
} Using the |
Would you like to add more error handling for return values from functions like the following?
The text was updated successfully, but these errors were encountered: