[pok-devel] Little patch

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Hi,

Just made a little patch to fix a bug with gcc >= 4.6 due to the [-Werror=unused-but-set-variable] option activated by default.

Thank's,
Matias

Index: kernel/arch/ppc/syscalls.c
===================================================================
--- kernel/arch/ppc/syscalls.c	(révision 30)
+++ kernel/arch/ppc/syscalls.c	(copie de travail)
@@ -29,7 +29,6 @@
    uint8_t              part_id;
 
    pok_syscall_info_t   syscall_info;
-   pok_ret_t            syscall_ret;
    pok_syscall_args_t   syscall_args;
    pok_syscall_id_t     syscall_id;
 
@@ -52,16 +51,11 @@
    /* prepare syscall_id */
    syscall_id = (pok_syscall_id_t) num;
 
-   if (POK_CHECK_PTR_IN_PARTITION(syscall_info.partition, &syscall_args) == 0)
+   if (POK_CHECK_PTR_IN_PARTITION(syscall_info.partition, &syscall_args) != 0)
    {
-         syscall_ret = POK_ERRNO_EINVAL;
-   }
-   else
-   {
       /*
        * Perform the syscall baby !
        */
-      syscall_ret = pok_core_syscall (syscall_id, &syscall_args, &syscall_info);
+     pok_core_syscall (syscall_id, &syscall_args, &syscall_info);
    }
-
 }
Index: kernel/arch/ppc/timer.c
===================================================================
--- kernel/arch/ppc/timer.c	(révision 30)
+++ kernel/arch/ppc/timer.c	(copie de travail)
@@ -86,11 +86,9 @@
 
 pok_ret_t pok_bsp_time_init ()
 {
-  int err;
-
   time_inter = (BUS_FREQ * FREQ_DIV) / POK_TIMER_FREQUENCY;
   time_last = get_ppc_tb ();
-  err = pok_arch_set_decr();
+  pok_arch_set_decr();
 
   return (POK_ERRNO_OK);
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/