Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 3776fd0b42e473fe51d3678bf26cdaa37e1d8e0d Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 8 Apr 2017 13:36:12 -0700 |
| 4 | Subject: [PATCH] Add format attribute to _synctex_malloc |
| 5 | |
| 6 | Helps in avoiding compile errors about formating with clang |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
| 10 | cut-n-paste/synctex/synctex_parser_utils.c | 1 + |
| 11 | 1 file changed, 1 insertion(+) |
| 12 | |
| 13 | diff --git a/cut-n-paste/synctex/synctex_parser_utils.c b/cut-n-paste/synctex/synctex_parser_utils.c |
| 14 | index f8a9f6f..9459b2d 100644 |
| 15 | --- a/cut-n-paste/synctex/synctex_parser_utils.c |
| 16 | +++ b/cut-n-paste/synctex/synctex_parser_utils.c |
| 17 | @@ -78,6 +78,7 @@ void *_synctex_malloc(size_t size) { |
| 18 | return (void *)ptr; |
| 19 | } |
| 20 | |
| 21 | +__attribute__((__format__ (__printf__, 1, 0))) |
| 22 | int _synctex_error(const char * reason,...) { |
| 23 | va_list arg; |
| 24 | int result; |
| 25 | -- |
| 26 | 2.12.2 |
| 27 | |