[pok-devel] [6] Remove `set but not used' variables.

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


Revision: 6
Author:   coredumper
Date:     2011-07-14 13:13:52 +0200 (Thu, 14 Jul 2011)
Log Message:
-----------
Remove `set but not used' variables.

Unlike its predecessors, GCC 4.6 now reports variables that are set but
never used. This change removes two of them, found in the kernel layer.

Modified Paths:
--------------
    trunk/kernel/core/lockobj.c
    trunk/kernel/core/partition.c

Modified: trunk/kernel/core/lockobj.c
===================================================================
--- trunk/kernel/core/lockobj.c	2011-07-14 10:10:06 UTC (rev 5)
+++ trunk/kernel/core/lockobj.c	2011-07-14 11:13:52 UTC (rev 6)
@@ -127,7 +127,6 @@
    pok_ret_t ret;
    uint8_t lower_bound = 0;
    uint8_t upper_bound = 0;
-   uint8_t nb_lockobjs = 0;
    bool_t  found = FALSE;
 
    if (  (POK_CURRENT_PARTITION.mode != POK_PARTITION_MODE_INIT_COLD) &&
@@ -140,7 +139,6 @@
 
    lower_bound = pok_partitions[pid].lockobj_index_low;
    upper_bound = pok_partitions[pid].lockobj_index_high;
-   nb_lockobjs = pok_partitions[pid].nlockobjs;
 
    /*
     * Find a lockobject for the partition

Modified: trunk/kernel/core/partition.c
===================================================================
--- trunk/kernel/core/partition.c	2011-07-14 10:10:06 UTC (rev 5)
+++ trunk/kernel/core/partition.c	2011-07-14 11:13:52 UTC (rev 6)
@@ -114,12 +114,9 @@
  */
 void pok_partition_setup_main_thread (const uint8_t pid)
 {
-   uint32_t size;
    uint32_t main_thread;
    pok_thread_attr_t attr;
 
-   size = pok_partitions[pid].size;
-
    attr.entry = (uint32_t*)pok_partitions[pid].thread_main_entry;
    attr.priority = 1;
    attr.deadline = 0;


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