[FIX] warnings in swap_uprobe
authorAnastasia Lyupa <a.lyupa@samsung.com>
Wed, 6 Nov 2013 08:14:24 +0000 (12:14 +0400)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 7 Nov 2013 07:48:43 +0000 (07:48 +0000)
build it with -Werror

Change-Id: I254ad6d921e72e347047ec0da5f045cbc444581b
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
build.sh
uprobe/arch/asm-x86/swap_uprobes.c
uprobe/arch/asm-x86/swap_uprobes.h
uprobe/swap_uprobes.c

index 1b3688f..1aae571 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -67,7 +67,7 @@ make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${ks_manager
 
 uprobe_module_name=swap_uprobe.ko
 make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${uprobe_dir} \
-       extra_cflags="-I${modules_dir} -I${kprobe_dir} -I${kprobe_arch_dir} -I${uprobe_dir} -I${uprobe_arch_dir}" \
+       extra_cflags="-Werror -I${modules_dir} -I${kprobe_dir} -I${kprobe_arch_dir} -I${uprobe_dir} -I${uprobe_arch_dir}" \
        modules || exit 1
 
 us_manager_module_name=swap_us_manager.ko
index b03ef06..4a135d4 100644 (file)
@@ -110,7 +110,7 @@ int setjmp_upre_handler(struct kprobe *p, struct pt_regs *regs)
        struct ujprobe *jp = container_of(up, struct ujprobe, up);
        kprobe_pre_entry_handler_t pre_entry = (kprobe_pre_entry_handler_t)jp->pre_entry;
        entry_point_t entry = (entry_point_t)jp->entry;
-       unsigned long addr, args[6];
+       unsigned long args[6];
 
        /* FIXME some user space apps crash if we clean interrupt bit */
        //regs->EREG(flags) &= ~IF_MASK;
@@ -123,7 +123,7 @@ int setjmp_upre_handler(struct kprobe *p, struct pt_regs *regs)
                panic("failed to read user space func arguments %lx!\n", regs->EREG(sp) + 4);
 
        if (pre_entry)
-               p->ss_addr = pre_entry(jp->priv_arg, regs);
+               p->ss_addr = (kprobe_opcode_t *)pre_entry(jp->priv_arg, regs);
 
        if (entry)
                entry(args[0], args[1], args[2], args[3], args[4], args[5]);
index c3a099d..3af126f 100644 (file)
@@ -40,7 +40,7 @@ static inline int longjmp_break_uhandler(struct kprobe *p, struct pt_regs *regs)
        return 0;
 }
 
-static inline int arch_opcode_analysis_uretprobe(kprobe_opcode_t opcode)
+static inline int arch_opcode_analysis_uretprobe(struct uretprobe *rp)
 {
        return 0;
 }
index e6733fa..cfcd75e 100644 (file)
@@ -378,7 +378,6 @@ struct kprobe *get_ukprobe_by_insn_slot(void *addr, pid_t tgid, struct pt_regs *
 static void remove_uprobe(struct uprobe *up)
 {
        struct kprobe *p = &up->kp;
-       struct task_struct *task = up->task;
 
 #ifdef CONFIG_ARM
        free_insn_slot(up->sm, p->ainsn.insn_arm);