Clang also removed K&R support so define IMPLICIT_INT. Fix clang warning in lib/bt-log.c
Unified · Split
| @@ -39,7 +39,7 @@ DLL_EXPORT int tcc_backtrace(const char *fmt, ...) · 38 unmodified lines | ||
| 39 | 39 | va_start(ap, fmt); |
| 40 | 40 | ret = vfprintf(stderr, fmt, ap); |
| 41 | 41 | va_end(ap); |
| 42 | − fprintf(stderr, nl), fflush(stderr); | |
| 42 | + fprintf(stderr, "%s", nl), fflush(stderr); | |
| 43 | 43 | } |
| 44 | 44 | return ret; |
| 45 | 45 | } |
| @@ -341,7 +341,7 @@ static struct recursive_macro { int rm_field; } G; · 340 unmodified lines | ||
| 341 | 341 | WRAP((printf("rm_field = %d %d\n", rm_field, WRAP(rm_field)))); |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | −#if !defined(__TINYC__) && (__GNUC__ >= 14) | |
| 344 | +#if !defined(__TINYC__) && (__GNUC__ >= 14 || __clang_major__ >= 15) | |
| 345 | 345 | #define IMPLICIT_INT int |
| 346 | 346 | #else |
| 347 | 347 | #define IMPLICIT_INT |