1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-922 Mark PIOS_DEBUG_Panic with attribute noreturn

This commit is contained in:
Stefan Karlsson 2014-08-16 08:34:45 +02:00
parent a309537e62
commit 22e981ea87
4 changed files with 12 additions and 2 deletions

View File

@ -58,7 +58,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin);
void PIOS_DEBUG_PinLow(uint8_t pin);
void PIOS_DEBUG_PinValue8Bit(uint8_t value);
void PIOS_DEBUG_PinValue4BitL(uint8_t value);
void PIOS_DEBUG_Panic(const char *msg);
void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn));
#ifdef DEBUG
#define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); }

View File

@ -38,7 +38,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin);
void PIOS_DEBUG_PinLow(uint8_t pin);
void PIOS_DEBUG_PinValue8Bit(uint8_t value);
void PIOS_DEBUG_PinValue4BitL(uint8_t value);
void PIOS_DEBUG_Panic(const char *msg);
void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn));
#ifdef DEBUG
#define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); }

View File

@ -82,6 +82,11 @@ void PIOS_DEBUG_Panic(const char *msg)
int b = 0;
int a = (2 / b);
b = a;
// Stay put
while (1) {
;
}
}
/**

View File

@ -81,6 +81,11 @@ void PIOS_DEBUG_Panic(const char *msg)
int b = 0;
int a = (2 / b);
b = a;
// Stay put
while (1) {
;
}
}
/**