Merge pull request #6666 from bgort/M100fix
Fix compiler complaint related to M100
This commit is contained in:
		
						commit
						192db2ab1b
					
				| @ -153,15 +153,14 @@ void M100_dump_routine(const char * const title, const char *start, const char * | |||||||
|  *  Return the number of free bytes in the memory pool, |  *  Return the number of free bytes in the memory pool, | ||||||
|  *  with other vital statistics defining the pool. |  *  with other vital statistics defining the pool. | ||||||
|  */ |  */ | ||||||
| void free_memory_pool_report(char * const ptr, const uint16_t size) { | void free_memory_pool_report(char * const ptr, const int16_t size) { | ||||||
|   int16_t max_cnt = -1; |   int16_t max_cnt = -1, block_cnt = 0; | ||||||
|   uint16_t block_cnt = 0; |  | ||||||
|   char *max_addr = NULL; |   char *max_addr = NULL; | ||||||
|   // Find the longest block of test bytes in the buffer
 |   // Find the longest block of test bytes in the buffer
 | ||||||
|   for (uint16_t i = 0; i < size; i++) { |   for (int16_t i = 0; i < size; i++) { | ||||||
|     char *addr = ptr + i; |     char *addr = ptr + i; | ||||||
|     if (*addr == TEST_BYTE) { |     if (*addr == TEST_BYTE) { | ||||||
|       const uint16_t j = count_test_bytes(addr); |       const int16_t j = count_test_bytes(addr); | ||||||
|       if (j > 8) { |       if (j > 8) { | ||||||
|         SERIAL_ECHOPAIR("Found ", j); |         SERIAL_ECHOPAIR("Found ", j); | ||||||
|         SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr)); |         SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr)); | ||||||
| @ -225,8 +224,8 @@ void init_free_memory(char *ptr, int16_t size) { | |||||||
|   SERIAL_ECHO(size); |   SERIAL_ECHO(size); | ||||||
|   SERIAL_ECHOLNPGM(" bytes of memory initialized.\n"); |   SERIAL_ECHOLNPGM(" bytes of memory initialized.\n"); | ||||||
| 
 | 
 | ||||||
|   for (uint16_t i = 0; i < size; i++) { |   for (int16_t i = 0; i < size; i++) { | ||||||
|     if ((char)ptr[i] != TEST_BYTE) { |     if (ptr[i] != TEST_BYTE) { | ||||||
|       SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i)); |       SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i)); | ||||||
|       SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i])); |       SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i])); | ||||||
|       SERIAL_EOL; |       SERIAL_EOL; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user