From patchwork Thu Jun 26 08:39:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1758 Received: (qmail 14210 invoked by alias); 26 Jun 2014 08:38:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14199 invoked by uid 89); 26 Jun 2014 08:38:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Thu, 26 Jun 2014 14:09:48 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] Fix Wundef warning for SEPARATE_KEY Message-ID: <20140626083948.GV4477@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) The SEPARATE_KEY macro is never defined in any condition or architecture. It is effectively dead code, so remove it. Siddhesh * nscd/connections.c (enum usekey) [SEPARATE_KEY]: Remove code. (verify_persistent_db): Likewise. diff --git a/nscd/connections.c b/nscd/connections.c index 180ae77..3e950af 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; }