svn commit: r316166 - head/ports-mgmt/pkg/files

Baptiste Daroussin bapt at FreeBSD.org
Sat Apr 20 21:44:05 UTC 2013


Author: bapt
Date: Sat Apr 20 21:44:04 2013
New Revision: 316166
URL: http://svnweb.freebsd.org/changeset/ports/316166

Log:
  Fix build after addition of -Wmissing-variable-declarations to WARNS=6 in HEAD
  
  Submitted by:	ed
  Feature safe:	yes

Added:
  head/ports-mgmt/pkg/files/
  head/ports-mgmt/pkg/files/patch-Wmissing-variable-declarations   (contents, props changed)

Added: head/ports-mgmt/pkg/files/patch-Wmissing-variable-declarations
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-Wmissing-variable-declarations	Sat Apr 20 21:44:04 2013	(r316166)
@@ -0,0 +1,56 @@
+--- libpkg/pkg_elf.c
++++ libpkg/pkg_elf.c
+@@ -468,7 +468,7 @@
+ }
+ 
+ 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;
+ 
+--- libpkg/private/elf_tables.h
++++ libpkg/private/elf_tables.h
+@@ -30,7 +30,7 @@
+ 	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 @@
+ 	{ -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 }
+ };
+--- pkg/main.c
++++ pkg/main.c
+@@ -90,7 +90,7 @@
+ 	{ "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 void
+ usage(void)


More information about the svn-ports-all mailing list