Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
@@ -695,7 +695,13 @@ int main(void) {
// default to silent mode to prevent issues with Ford
// hardcode a specific safety mode if you want to force the panda to be in a specific mode
- safety_set_mode(SAFETY_NOOUTPUT, 0);
+ int err = safety_set_mode(SAFETY_NOOUTPUT, 0);
+ if (err == -1) {
+ puts("Failed to set safety mode\n");
+ while (true) {
+ // if SAFETY_NOOUTPUT isn't succesfully set, we can't continue
+ }
+ }
#ifdef EON
// if we're on an EON, it's fine for CAN to be live for fingerprinting
can_silent = ALL_CAN_LIVE;
