Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
debug: appease gcc
Baptiste Daroussin committed 2 years ago
commit 6cccc24af5ebe8500a3a58f1e676e7cfca5764b6
parent d206f3a
2 files changed +6 -4
modified libpkg/pkg_config.c
@@ -996,7 +996,7 @@ type_to_string(int type)
	return ("unknown");
}

-
struct pkg_dbg_flags *
+
const struct pkg_dbg_flags *
_find_flag(const char *str)
{
	for (size_t i = 0; i < NELEM(debug_flags); i++) {
@@ -1011,7 +1011,7 @@ config_validate_debug_flags(const ucl_object_t *o)
	ucl_object_iter_t it = NULL;
	const ucl_object_t *cur;
	int ret = EPKG_OK;
-
	struct pkg_dbg_flags *f;
+
	const struct pkg_dbg_flags *f;

	if (o == NULL)
		return (ret);
modified libpkg/private/event.h
@@ -56,10 +56,12 @@ typedef enum {
	PKG_DBG_ALL = (1UL << 63),
} pkg_debug_flags;

-
static struct pkg_dbg_flags {
+
struct pkg_dbg_flags {
	uint64_t flag;
	const char *name;
-
} debug_flags[] = {
+
};
+

+
static const struct pkg_dbg_flags debug_flags[] = {
	{ PKG_DBG_NONE, "none" },
	{ PKG_DBG_FETCH, "fetch" },
	{ PKG_DBG_ALL, "all" },