ehlo,

I tested some patches on RHEL6. and there is newly introduced warning.
gcc version 4.4.7

src/providers/krb5/krb5_utils.c:193: warning: declaration of 'rewind' shadows a
global declaration
/usr/include/stdio.h:754: warning: shadowed declaration is here

Warning was introduced in patch dcc6877aa2e2dd63a9dc9c411a9c58feaeb36b9a
"krb5: Fetch ccname template from krb5.conf"

LS
>From 90bf143fff46cd8f263ece856d8af0d4e8a8ee99 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <[email protected]>
Date: Fri, 30 Aug 2013 23:52:15 +0200
Subject: [PATCH 2/2] KRB5: Fix warning declaration shadows global declaration

src/providers/krb5/krb5_utils.c:193: warning: declaration of 'rewind' shadows a
global declaration
/usr/include/stdio.h:754: warning: shadowed declaration is here
---
 src/providers/krb5/krb5_utils.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
index 
dc4c448efe06a75105f6e9181837cc3c28bd7256..e15e9c8acd5c96b316c6c7305eb3f0d3e2bc48dc
 100644
--- a/src/providers/krb5/krb5_utils.c
+++ b/src/providers/krb5/krb5_utils.c
@@ -190,7 +190,7 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct 
krb5child_req *kr,
     const char *cache_dir_tmpl;
     TALLOC_CTX *tmp_ctx = NULL;
     char action;
-    bool rewind;
+    bool want_rewind;
 
     *private_path = false;
 
@@ -223,10 +223,10 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct 
krb5child_req *kr,
             goto done;
         }
 
-        rewind = true;
+        want_rewind = true;
         action = *n;
-        while (rewind) {
-            rewind = false;
+        while (want_rewind) {
+            want_rewind = false;
             switch (action) {
             case 'u':
                 if (kr->pd->user == NULL) {
@@ -332,19 +332,19 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct 
krb5child_req *kr,
                 } else if (strncmp(n , S_EXP_UID, L_EXP_UID) == 0) {
                     action = 'U';
                     n += L_EXP_UID - 1;
-                    rewind = true;
+                    want_rewind = true;
                     continue;
                 } else if (strncmp(n , S_EXP_USERID, L_EXP_USERID) == 0) {
                     action = 'U';
                     n += L_EXP_USERID - 1;
-                    rewind = true;
+                    want_rewind = true;
                     continue;
                 } else if (strncmp(n , S_EXP_EUID, L_EXP_EUID) == 0) {
                     /* SSSD does not distinguish betwen uid and euid,
                      * so we treat both the same way */
                     action = 'U';
                     n += L_EXP_EUID - 1;
-                    rewind = true;
+                    want_rewind = true;
                     continue;
                 } else if (strncmp(n , S_EXP_NULL, L_EXP_NULL) == 0) {
                     /* skip immediately */
@@ -352,7 +352,7 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct 
krb5child_req *kr,
                 } else if (strncmp(n , S_EXP_USERNAME, L_EXP_USERNAME) == 0) {
                     action = 'u';
                     n += L_EXP_USERNAME - 1;
-                    rewind = true;
+                    want_rewind = true;
                     continue;
                 } else if (strncmp(n , S_EXP_LIBDIR, L_EXP_LIBDIR) == 0) {
                     /* skip, only the libkrb5 library can resolve this */
-- 
1.8.3.1

_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to