-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
MISRA-C Checking function return #9930
Commits on Sep 13, 2018
-
misc: printk: Change function return
The result of both printk and vprintk are not used in any place. MISRA-C says that the return of every non void function must be checked. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for c81a763 - Browse repository at this point
Copy the full SHA c81a763View commit details -
kernel: syscall: Explicitly ignoring not used return
Some syscacll return value through parameters and for these functions the return of _arch_syscall_invoke* are not used. MISRA requires that all return values be checked. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for bfcd047 - Browse repository at this point
Copy the full SHA bfcd047View commit details -
kernel: swap: Fix __swap signature
__swap function was returning -EAGAIN in some case, though its return value was declared as unsigned int. This commit changes this function to return int since it can return a negative value and its return was already been propagate as int. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for d5796e7 - Browse repository at this point
Copy the full SHA d5796e7View commit details -
kernel: Explicitly ignoring _Swap return
Ignoring _Swap return where there is no treatment or nothing to do. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for 99184f7 - Browse repository at this point
Copy the full SHA 99184f7View commit details -
coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore the return to avoid MISRA-C violations. The only directory excluded directory was ext/* since it contains only imported code. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for 6bf7d0a - Browse repository at this point
Copy the full SHA 6bf7d0aView commit details -
kernel: Ignore _pend_current_thread return in some cases
There are some cases that there is nothing to do with _pend_current_thread() return (that is _Swap return value). As MISRA-C requires that all non-void functions have their return value checked, we are explicitly ignoring it when there is nothing to do. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for 22e8c14 - Browse repository at this point
Copy the full SHA 22e8c14View commit details -
kernel: Ignore _abort_timeout return
Ignoring the return of _abort_timeout when there is nothing to do. Either because the condition to return something different from 0 was prior checked or because it was called during come cleanup. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for b3e87a4 - Browse repository at this point
Copy the full SHA b3e87a4View commit details -
kernel: atomic: Ignore atomic_and/or return when not used
There are some cases where atomic_and/or don't need to be checked. Actively acknowledge these cases. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for e616303 - Browse repository at this point
Copy the full SHA e616303View commit details -
kernel: Change _reschedule signature
_reschedule return's value is not used anywhere, except erroneously by pthread_barrier_wait. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for 04a802c - Browse repository at this point
Copy the full SHA 04a802cView commit details -
kernel: Explicitly check _abort_thread_timemout
A lot of times this API is called during some cleanup even if the timeout was not set to make the code simpler. In these cases it's not necessary checking the return. Adding a cast to acknowledge it. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for f47ed76 - Browse repository at this point
Copy the full SHA f47ed76View commit details -
kernel: Check k_thread_create return value
k_thread_create is used only in k_word_q_start that has no error handling, so the return of that function is not used. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for 8ed4493 - Browse repository at this point
Copy the full SHA 8ed4493View commit details -
kernel; Checking functions return
Checking the return of some scattered functions across kernel. MISRA-C requires that all non-void functions have their return value checked, though, in some cases there is nothing to do. Just acknowledging it. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Flavio Ceolin committedSep 13, 2018 Configuration menu - View commit details
-
Copy full SHA for cde5ff0 - Browse repository at this point
Copy the full SHA cde5ff0View commit details