BUG_exit_code: fix sparse "symbol not declared" warning
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		 Ramsay Jones
					Ramsay Jones
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							c3c3486b24
						
					
				
				
					commit
					746ea4adc6
				
			| @ -1111,6 +1111,9 @@ static inline int regexec_buf(const regex_t *preg, const char *buf, size_t size, | |||||||
| #define HAVE_VARIADIC_MACROS 1 | #define HAVE_VARIADIC_MACROS 1 | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | /* usage.c: only to be used for testing BUG() implementation (see test-tool) */ | ||||||
|  | extern int BUG_exit_code; | ||||||
|  |  | ||||||
| #ifdef HAVE_VARIADIC_MACROS | #ifdef HAVE_VARIADIC_MACROS | ||||||
| __attribute__((format (printf, 3, 4))) NORETURN | __attribute__((format (printf, 3, 4))) NORETURN | ||||||
| void BUG_fl(const char *file, int line, const char *fmt, ...); | void BUG_fl(const char *file, int line, const char *fmt, ...); | ||||||
|  | |||||||
| @ -47,7 +47,6 @@ static struct test_cmd cmds[] = { | |||||||
| int cmd_main(int argc, const char **argv) | int cmd_main(int argc, const char **argv) | ||||||
| { | { | ||||||
| 	int i; | 	int i; | ||||||
| 	extern int BUG_exit_code; |  | ||||||
|  |  | ||||||
| 	BUG_exit_code = 99; | 	BUG_exit_code = 99; | ||||||
| 	if (argc < 2) | 	if (argc < 2) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user