mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	tests: Silence warnings in template
- no previous prototype for ‘test_assert’ - no previous prototype for ‘test_count’ - unused parameter ‘b’ in test_count - function declaration isn’t a prototype for main
This commit is contained in:
		
				
					committed by
					
						 Christopher Haster
						Christopher Haster
					
				
			
			
				
	
			
			
			
						parent
						
							029361ea16
						
					
				
				
					commit
					6d55755128
				
			| @@ -7,11 +7,11 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| // test stuff | // test stuff | ||||||
| void test_log(const char *s, uintmax_t v) {{ | static void test_log(const char *s, uintmax_t v) {{ | ||||||
|     printf("%s: %jd\n", s, v); |     printf("%s: %jd\n", s, v); | ||||||
| }} | }} | ||||||
|  |  | ||||||
| void test_assert(const char *file, unsigned line, | static void test_assert(const char *file, unsigned line, | ||||||
|         const char *s, uintmax_t v, uintmax_t e) {{ |         const char *s, uintmax_t v, uintmax_t e) {{ | ||||||
|     static const char *last[6] = {{0, 0}}; |     static const char *last[6] = {{0, 0}}; | ||||||
|     if (v != e || !(last[0] == s || last[1] == s || |     if (v != e || !(last[0] == s || last[1] == s || | ||||||
| @@ -37,7 +37,8 @@ void test_assert(const char *file, unsigned line, | |||||||
|  |  | ||||||
|  |  | ||||||
| // utility functions for traversals | // utility functions for traversals | ||||||
| int test_count(void *p, lfs_block_t b) {{ | static int __attribute__((used)) test_count(void *p, | ||||||
|  | 	lfs_block_t b __attribute__((unused))) {{ | ||||||
|     unsigned *u = (unsigned*)p; |     unsigned *u = (unsigned*)p; | ||||||
|     *u += 1; |     *u += 1; | ||||||
|     return 0; |     return 0; | ||||||
| @@ -96,7 +97,7 @@ const struct lfs_config cfg = {{ | |||||||
|  |  | ||||||
|  |  | ||||||
| // Entry point | // Entry point | ||||||
| int main() {{ | int main(void) {{ | ||||||
|     lfs_emubd_create(&cfg, "blocks"); |     lfs_emubd_create(&cfg, "blocks"); | ||||||
|  |  | ||||||
| {tests} | {tests} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user