| 25 | #define LOGI(fmt, ...) _LOG(ANDROID_LOG_INFO, (fmt)__VA_OPT__(, ) __VA_ARGS__) |
| 26 | |
| 27 | [[noreturn]] __attribute__((__format__(__printf__, 1, 2))) static void fatal( |
| 28 | const char* fmt, ...) { |
| 29 | va_list ap; |
| 30 | va_start(ap, fmt); |
| 31 | char* buf; |
| 32 | if (vasprintf(&buf, fmt, ap) < 0) { |
| 33 | android_set_abort_message("failed for format error message"); |
| 34 | } else { |
| 35 | android_set_abort_message(buf); |
| 36 | // Also log directly, since the default Android Studio logcat filter hides |
| 37 | // the backtrace which would otherwise show the abort message. |
| 38 | LOGE("%s", buf); |
| 39 | } |
| 40 | std::abort(); |
| 41 | } |
| 42 | |
| 43 | #define CHECK_NOT_NULL(value) \ |
| 44 | do { \ |
no outgoing calls
no test coverage detected