-#ifndef BABELTRACE_ERROR_INTERNAL_H
-#define BABELTRACE_ERROR_INTERNAL_H
-
/*
- * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
+ * SPDX-License-Identifier: MIT
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
*/
+#ifndef BABELTRACE_ERROR_INTERNAL_H
+#define BABELTRACE_ERROR_INTERNAL_H
+
#include <stdarg.h>
#include <glib.h>
#include <babeltrace2/babeltrace.h>
BT_HIDDEN
void bt_error_destroy(struct bt_error *error);
-BT_HIDDEN
+BT_HIDDEN __BT_ATTR_FORMAT_PRINTF(5, 0)
int bt_error_append_cause_from_unknown(struct bt_error *error,
const char *module_name, const char *file_name,
uint64_t line_no, const char *msg_fmt, va_list args);
-BT_HIDDEN
+BT_HIDDEN __BT_ATTR_FORMAT_PRINTF(5, 0)
int bt_error_append_cause_from_component(
struct bt_error *error, bt_self_component *self_comp,
const char *file_name, uint64_t line_no,
const char *msg_fmt, va_list args);
-BT_HIDDEN
+BT_HIDDEN __BT_ATTR_FORMAT_PRINTF(5, 0)
int bt_error_append_cause_from_component_class(
struct bt_error *error,
bt_self_component_class *self_comp_class,
const char *file_name, uint64_t line_no,
const char *msg_fmt, va_list args);
-BT_HIDDEN
+BT_HIDDEN __BT_ATTR_FORMAT_PRINTF(5, 0)
int bt_error_append_cause_from_message_iterator(
struct bt_error *error, bt_self_message_iterator *self_iter,
const char *file_name, uint64_t line_no,