Fix STM32F1 'freeMemory()' warnings (#20319)
This commit is contained in:
		
				
					committed by
					
						 Scott Lahteine
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							a8ba3c4e2e
						
					
				
				
					commit
					272265c636
				
			| @@ -202,17 +202,9 @@ extern "C" { | ||||
|  | ||||
| extern "C" char* _sbrk(int incr); | ||||
|  | ||||
| /* | ||||
| static int freeMemory() { | ||||
|   volatile int top; | ||||
|   top = (int)((char*)&top - reinterpret_cast<char*>(_sbrk(0))); | ||||
|   return top; | ||||
| } | ||||
| */ | ||||
|  | ||||
| static int freeMemory() { | ||||
| static inline int freeMemory() { | ||||
|   volatile char top; | ||||
|   return &top - reinterpret_cast<char*>(_sbrk(0)); | ||||
|   return &top - _sbrk(0); | ||||
| } | ||||
|  | ||||
| #if GCC_VERSION <= 50000 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user