summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-06-26 14:10:07 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-06-26 22:30:35 +0530
commit2aac0a862334f3370a7e0b6bc7a53cf0ab847182 (patch)
tree63b73184dac3f85b12946fda62a658a18e572717
parentd8a483f3ef9aaa9d4d4e5b72af586a44ae2daac3 (diff)
downloadglibc-2aac0a862334f3370a7e0b6bc7a53cf0ab847182.tar.gz
glibc-2aac0a862334f3370a7e0b6bc7a53cf0ab847182.tar.xz
glibc-2aac0a862334f3370a7e0b6bc7a53cf0ab847182.zip
Fix Wundef warning for SEPARATE_KEY
The SEPARATE_KEY macro is never defined in any condition or
architecture.  It is effectively dead code, so remove it.
-rw-r--r--ChangeLog6
-rw-r--r--nscd/connections.c21
2 files changed, 7 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 98b0eb2b32..39d46a62d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* nscd/connections.c (enum usekey) [SEPARATE_KEY]: Remove
+	code.
+	(verify_persistent_db): Likewise.
+
 2014-06-26  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/unix/sysv/linux/s390/s390-32/nptl/c++-types.data: Moved ...
diff --git a/nscd/connections.c b/nscd/connections.c
index 180ae7760a..3e950af9f1 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -318,12 +318,6 @@ enum usekey
     use_he = 1,
     use_he_begin = use_he | use_begin,
     use_he_end = use_he | use_end,
-#if SEPARATE_KEY
-    use_key = 2,
-    use_key_begin = use_key | use_begin,
-    use_key_end = use_key | use_end,
-    use_key_first = use_key_begin | use_first,
-#endif
     use_data = 3,
     use_data_begin = use_data | use_begin,
     use_data_end = use_data | use_end,
@@ -472,16 +466,7 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr)
 	  if (here->key < here->packet + sizeof (struct datahead)
 	      || here->key > here->packet + dh->allocsize
 	      || here->key + here->len > here->packet + dh->allocsize)
-	    {
-#if SEPARATE_KEY
-	      /* If keys can appear outside of data, this should be done
-		 instead.  But gc doesn't mark the data in that case.  */
-	      if (! check_use (data, head->first_free, usemap,
-			       use_key | (here->first ? use_first : 0),
-			       here->key, here->len))
-#endif
-		goto fail;
-	    }
+	    goto fail;
 
 	  work = here->next;
 
@@ -501,10 +486,6 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr)
      he->first == true hashentry.  */
   for (ref_t idx = 0; idx < head->first_free; ++idx)
     {
-#if SEPARATE_KEY
-      if (usemap[idx] == use_key_begin)
-	goto fail;
-#endif
       if (usemap[idx] == use_data_begin)
 	goto fail;
     }