Fix M100 compile warning
This commit is contained in:
parent
f263787f07
commit
19873f04d4
1 changed files with 8 additions and 3 deletions
|
@ -116,13 +116,18 @@
|
||||||
// Utility functions
|
// Utility functions
|
||||||
//
|
//
|
||||||
|
|
||||||
// Location of a variable on its stack frame. Returns a value above
|
#pragma GCC diagnostic push
|
||||||
// the stack (once the function returns to the caller).
|
#pragma GCC diagnostic ignored "-Wreturn-local-addr"
|
||||||
|
|
||||||
|
// Location of a variable in its stack frame.
|
||||||
|
// The returned address will be above the stack (after it returns).
|
||||||
char *top_of_stack() {
|
char *top_of_stack() {
|
||||||
char x;
|
char x;
|
||||||
return &x + 1; // x is pulled on return;
|
return &x + 1; // x is pulled on return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
// Count the number of test bytes at the specified location.
|
// Count the number of test bytes at the specified location.
|
||||||
inline int32_t count_test_bytes(const char * const start_free_memory) {
|
inline int32_t count_test_bytes(const char * const start_free_memory) {
|
||||||
for (uint32_t i = 0; i < 32000; i++)
|
for (uint32_t i = 0; i < 32000; i++)
|
||||||
|
|
Reference in a new issue