aboutsummaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 09:00:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 09:00:54 +0000
commit68404f13d4bf4826e3609703dad5375763db28ab (patch)
treeb89ed41daeb3a761ac9416a6eed090023b23e7e2 /modutils/insmod.c
parenta55bd05f3cea6c7cbfb45d15009cb70570c2a43b (diff)
downloadbusybox-w32-68404f13d4bf4826e3609703dad5375763db28ab.tar.gz
busybox-w32-68404f13d4bf4826e3609703dad5375763db28ab.tar.bz2
busybox-w32-68404f13d4bf4826e3609703dad5375763db28ab.zip
*: add -Wunused-parameter; fix resulting breakage
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 4620f6f95..079de6940 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -651,7 +651,7 @@ static struct obj_symbol *arch_new_symbol(void);
651 651
652static enum obj_reloc arch_apply_relocation(struct obj_file *f, 652static enum obj_reloc arch_apply_relocation(struct obj_file *f,
653 struct obj_section *targsec, 653 struct obj_section *targsec,
654 struct obj_section *symsec, 654 /*struct obj_section *symsec,*/
655 struct obj_symbol *sym, 655 struct obj_symbol *sym,
656 ElfW(RelM) *rel, ElfW(Addr) value); 656 ElfW(RelM) *rel, ElfW(Addr) value);
657 657
@@ -792,8 +792,9 @@ static char *m_fullName;
792/*======================================================================*/ 792/*======================================================================*/
793 793
794 794
795static int check_module_name_match(const char *filename, struct stat *statbuf, 795static int check_module_name_match(const char *filename,
796 void *userdata, int depth) 796 struct stat *statbuf ATTRIBUTE_UNUSED,
797 void *userdata, int depth ATTRIBUTE_UNUSED)
797{ 798{
798 char *fullname = (char *) userdata; 799 char *fullname = (char *) userdata;
799 char *tmp; 800 char *tmp;
@@ -835,7 +836,7 @@ static struct obj_symbol *arch_new_symbol(void)
835static enum obj_reloc 836static enum obj_reloc
836arch_apply_relocation(struct obj_file *f, 837arch_apply_relocation(struct obj_file *f,
837 struct obj_section *targsec, 838 struct obj_section *targsec,
838 struct obj_section *symsec, 839 /*struct obj_section *symsec,*/
839 struct obj_symbol *sym, 840 struct obj_symbol *sym,
840 ElfW(RelM) *rel, ElfW(Addr) v) 841 ElfW(RelM) *rel, ElfW(Addr) v)
841{ 842{
@@ -1751,7 +1752,7 @@ static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list,
1751 1752
1752#if defined(USE_SINGLE) 1753#if defined(USE_SINGLE)
1753 1754
1754static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single, 1755static int arch_single_init(/*ElfW(RelM) *rel,*/ struct arch_single_entry *single,
1755 int offset, int size) 1756 int offset, int size)
1756{ 1757{
1757 if (single->allocated == 0) { 1758 if (single->allocated == 0) {
@@ -1899,7 +1900,7 @@ static void arch_create_got(struct obj_file *f)
1899#if defined(USE_GOT_ENTRIES) 1900#if defined(USE_GOT_ENTRIES)
1900 if (got_allocate) { 1901 if (got_allocate) {
1901 got_offset += arch_single_init( 1902 got_offset += arch_single_init(
1902 rel, &intsym->gotent, 1903 /*rel,*/ &intsym->gotent,
1903 got_offset, GOT_ENTRY_SIZE); 1904 got_offset, GOT_ENTRY_SIZE);
1904 1905
1905 got_needed = 1; 1906 got_needed = 1;
@@ -1913,7 +1914,7 @@ static void arch_create_got(struct obj_file *f)
1913 plt_offset, PLT_ENTRY_SIZE); 1914 plt_offset, PLT_ENTRY_SIZE);
1914#else 1915#else
1915 plt_offset += arch_single_init( 1916 plt_offset += arch_single_init(
1916 rel, &intsym->pltent, 1917 /*rel,*/ &intsym->pltent,
1917 plt_offset, PLT_ENTRY_SIZE); 1918 plt_offset, PLT_ENTRY_SIZE);
1918#endif 1919#endif
1919 plt_needed = 1; 1920 plt_needed = 1;
@@ -3220,7 +3221,7 @@ static int obj_relocate(struct obj_file *f, ElfW(Addr) base)
3220 3221
3221 /* Do it! */ 3222 /* Do it! */
3222 switch (arch_apply_relocation 3223 switch (arch_apply_relocation
3223 (f, targsec, symsec, intsym, rel, value) 3224 (f, targsec, /*symsec,*/ intsym, rel, value)
3224 ) { 3225 ) {
3225 case obj_reloc_ok: 3226 case obj_reloc_ok:
3226 break; 3227 break;
@@ -3299,7 +3300,7 @@ static int obj_create_image(struct obj_file *f, char *image)
3299 3300
3300/*======================================================================*/ 3301/*======================================================================*/
3301 3302
3302static struct obj_file *obj_load(FILE * fp, int loadprogbits) 3303static struct obj_file *obj_load(FILE * fp, int loadprogbits ATTRIBUTE_UNUSED)
3303{ 3304{
3304 struct obj_file *f; 3305 struct obj_file *f;
3305 ElfW(Shdr) * section_headers; 3306 ElfW(Shdr) * section_headers;
@@ -4193,9 +4194,9 @@ static const char *moderror(int err)
4193 4194
4194#if !ENABLE_FEATURE_2_4_MODULES 4195#if !ENABLE_FEATURE_2_4_MODULES
4195int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 4196int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
4196int insmod_main(int argc, char **argv) 4197int insmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
4197#else 4198#else
4198static int insmod_ng_main(int argc, char **argv) 4199static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv)
4199#endif 4200#endif
4200{ 4201{
4201 long ret; 4202 long ret;