Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix build after addition of -Wmissing-variable-declarations to WARNS=6 in HEAD
Ed Schouten committed 13 years ago
commit 2dd845ce48a876946826871731e4e37e5d01ab85
parent 94f4dd8
3 files changed +6 -6
modified libpkg/pkg_elf.c
@@ -490,7 +490,7 @@ pkg_register_shlibs(struct pkg *pkg)
}

static const char *
-
elf_corres_to_string(struct _elf_corres* m, int e)
+
elf_corres_to_string(const struct _elf_corres* m, int e)
{
	int i = 0;

modified libpkg/private/elf_tables.h
@@ -30,7 +30,7 @@ struct _elf_corres {
	const char *string;
};

-
struct _elf_corres mach_corres[] = {
+
static const struct _elf_corres mach_corres[] = {
	{ EM_386, "x86" },
	{ EM_X86_64, "x86" },
	{ EM_ARM, "arm" },
@@ -42,19 +42,19 @@ struct _elf_corres mach_corres[] = {
	{ -1, NULL },
};

-
struct _elf_corres wordsize_corres[] = {
+
static const struct _elf_corres wordsize_corres[] = {
	{ ELFCLASS32, "32" },
	{ ELFCLASS64, "64" },
	{ -1, NULL},
};

-
struct _elf_corres endian_corres[] = {
+
static const struct _elf_corres endian_corres[] = {
	{ ELFDATA2MSB, "eb" },
	{ ELFDATA2LSB, "el" },
	{ -1, NULL}
};

-
struct _elf_corres os_corres[] = {
+
static const struct _elf_corres os_corres[] = {
	{ ELFOSABI_FREEBSD, "freebsd" },
	{ -1, NULL }
};
modified pkg/main.c
@@ -98,7 +98,7 @@ static struct commands {
	{ "which", "Displays which package installed a specific file", exec_which, usage_which},
};

-
const unsigned int cmd_len = (sizeof(cmd)/sizeof(cmd[0]));
+
static const unsigned int cmd_len = sizeof(cmd) / sizeof(cmd[0]);

static STAILQ_HEAD(, plugcmd) plugins = STAILQ_HEAD_INITIALIZER(plugins);
struct plugcmd {