[pisa-src] r1450 - trunk/pairing/management.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Fri, 30 Oct 2009 12:01:38 +0100

Author: tjansen
Date: Fri Oct 30 12:01:38 2009
New Revision: 1450

Log:
Fix -Wshadow warning:

management.c: In function ‘pisa_mgmt_parse_options’:
management.c:695: warning: declaration of ‘remove’ shadows a global declaration
/usr/include/stdio.h:157: warning: shadowed declaration is here

Modified:
   trunk/pairing/management.c

Modified: trunk/pairing/management.c
==============================================================================
--- trunk/pairing/management.c  Fri Oct 30 11:58:40 2009        (r1449)
+++ trunk/pairing/management.c  Fri Oct 30 12:01:38 2009        (r1450)
@@ -692,7 +692,7 @@
     int temp;
     int hit_given = 0;
     int expiration_given = 0;
-    int remove = 0;
+    int remove_mode = 0;
     int list = 0;
     int username_given = 0;
     int option_index = 0;
@@ -758,7 +758,7 @@
                 break;
 
             case 'r':
-                remove = 1;
+                remove_mode = 1;
                 break;
 
             case 'l':
@@ -826,7 +826,7 @@
     }
 
     // No mode was given
-    if (!list && !expiration_given && !remove && new_entry->active == 
NO_CHANGE)
+    if (!list && !expiration_given && !remove_mode && new_entry->active == 
NO_CHANGE)
     {
         PISA_ERROR("No mode was given.\n");
         pisa_mgmt_print_usage(argv);
@@ -844,8 +844,8 @@
         }
 
         // Modes cannot be combined
-        if ((list && (remove || expiration_given || new_entry->active != 
NO_CHANGE)) ||
-                (remove && (expiration_given || new_entry->active != 
NO_CHANGE)) ||
+        if ((list && (remove_mode || expiration_given || new_entry->active != 
NO_CHANGE)) ||
+                (remove_mode && (expiration_given || new_entry->active != 
NO_CHANGE)) ||
                 (expiration_given && new_entry->active == NO_CHANGE && 
!hit_given && !username_given))
         {
             PISA_ERROR("Modes cannot be combined.\n");
@@ -875,7 +875,7 @@
     }
 
     // Decide which remove-mode to use
-    if (remove)
+    if (remove_mode)
     {
         if (username_given)
         {

Other related posts:

  • » [pisa-src] r1450 - trunk/pairing/management.c - Thomas Jansen