From patchwork Mon Mar 17 12:23:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 26350 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9303B202FA for ; Mon, 17 Mar 2014 12:24:02 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf20722767ieb.5 for ; Mon, 17 Mar 2014 05:24:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=lMNuobJGJLNbmZYo8cqte6W1IcPyPEq/ABuSZzbNppI=; b=HnYv8VbSB8xGoevxDlAPtNDOGimEV8AqDAIMzzIdOSNhoPXiNSZ82WX959mvLO/XjS RqtXtuMqfONNkvn+vXARqT91fAeytMDYArnpPYgErvadsVbawrCea1BPN6H3KE5CJuMq 7x72o8Jlzh/yrs6tfxeNBBRz6iADPHnZbnjp4MKHyOX60nTTi/2oaC13UgSlSTWaU6to /NTIAscEVz3COOQ54wcOUrQC+lURpJJX40bb5oAnzeW60RDDKpIN1O8GI9js/8cbpA3k zIEUJcY50sVE2TgegkDwvVW8+H9An26mfDFWgdoDwHX0YeAVOD+PpRooXbIYg09jo9Q5 6jCQ== X-Gm-Message-State: ALoCoQn/b0V14xOZIvSk9/Dk98sx/vCTFPskU2XNn0Z69CCbIbNkl2MCGuI/gurucrVdwE/ZmiPx X-Received: by 10.43.163.199 with SMTP id mp7mr7881175icc.6.1395059042093; Mon, 17 Mar 2014 05:24:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.110 with SMTP id 101ls1162969qgq.88.gmail; Mon, 17 Mar 2014 05:24:02 -0700 (PDT) X-Received: by 10.220.95.139 with SMTP id d11mr6697405vcn.21.1395059041992; Mon, 17 Mar 2014 05:24:01 -0700 (PDT) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [2607:f8b0:400c:c03::22b]) by mx.google.com with ESMTPS id fi2si2270071vcb.144.2014.03.17.05.24.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 05:24:01 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::22b; Received: by mail-vc0-f171.google.com with SMTP id lg15so5556248vcb.2 for ; Mon, 17 Mar 2014 05:24:01 -0700 (PDT) X-Received: by 10.221.40.10 with SMTP id to10mr2771573vcb.22.1395059041892; Mon, 17 Mar 2014 05:24:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp123158vck; Mon, 17 Mar 2014 05:24:01 -0700 (PDT) X-Received: by 10.68.194.202 with SMTP id hy10mr25519944pbc.94.1395059040799; Mon, 17 Mar 2014 05:24:00 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id zm8si9863410pac.235.2014.03.17.05.24.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Mar 2014 05:24:00 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-48210-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 18791 invoked by alias); 17 Mar 2014 12:23:39 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 18742 invoked by uid 89); 17 Mar 2014 12:23:35 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f173.google.com X-Received: by 10.180.11.36 with SMTP id n4mr9386949wib.4.1395059010800; Mon, 17 Mar 2014 05:23:30 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 2/7] Fix _STRING_ARCH_unaligned -Wundef warnings Date: Mon, 17 Mar 2014 12:23:19 +0000 Message-Id: <1395059004-20960-2-git-send-email-will.newton@linaro.org> In-Reply-To: <1395059004-20960-1-git-send-email-will.newton@linaro.org> References: <1395059004-20960-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 ChangeLog: 2014-03-17 Will Newton * crypt/md5.c: Check whether _STRING_ARCH_unaligned is defined with #ifdef rather than #if. * crypt/sha256.c: Likewise. * crypt/sha512.c: Likewise. * include/arpa/nameser.h: Likewise. * stdlib/getenv.c: Likewise. * string/bits/string2.h: Likewise. --- crypt/md5.c | 2 +- crypt/sha256.c | 2 +- crypt/sha512.c | 2 +- include/arpa/nameser.h | 2 +- stdlib/getenv.c | 8 ++++---- string/bits/string2.h | 10 +++++----- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crypt/md5.c b/crypt/md5.c index a444a18..116537a 100644 --- a/crypt/md5.c +++ b/crypt/md5.c @@ -242,7 +242,7 @@ md5_process_bytes (buffer, len, ctx) /* Process available complete blocks. */ if (len >= 64) { -#if !_STRING_ARCH_unaligned +#ifndef _STRING_ARCH_unaligned /* To check alignment gcc has an appropriate operator. Other compilers don't. */ # if __GNUC__ >= 2 diff --git a/crypt/sha256.c b/crypt/sha256.c index a5df83e..39f9afb 100644 --- a/crypt/sha256.c +++ b/crypt/sha256.c @@ -177,7 +177,7 @@ __sha256_process_bytes (buffer, len, ctx) /* Process available complete blocks. */ if (len >= 64) { -#if !_STRING_ARCH_unaligned +#ifndef _STRING_ARCH_unaligned /* To check alignment gcc has an appropriate operator. Other compilers don't. */ # if __GNUC__ >= 2 diff --git a/crypt/sha512.c b/crypt/sha512.c index f0c0725..4bbe496 100644 --- a/crypt/sha512.c +++ b/crypt/sha512.c @@ -199,7 +199,7 @@ __sha512_process_bytes (buffer, len, ctx) /* Process available complete blocks. */ if (len >= 128) { -#if !_STRING_ARCH_unaligned +#ifndef _STRING_ARCH_unaligned /* To check alignment gcc has an appropriate operator. Other compilers don't. */ # if __GNUC__ >= 2 diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index 57f7457..a0aea28 100644 --- a/include/arpa/nameser.h +++ b/include/arpa/nameser.h @@ -11,7 +11,7 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden; -#if _STRING_ARCH_unaligned +#ifdef _STRING_ARCH_unaligned # undef NS_GET16 # define NS_GET16(s, cp) \ diff --git a/stdlib/getenv.c b/stdlib/getenv.c index e8cb913..ed4de87 100644 --- a/stdlib/getenv.c +++ b/stdlib/getenv.c @@ -45,14 +45,14 @@ getenv (name) /* The name of the variable consists of only one character. Therefore the first two characters of the environment entry are this character and a '=' character. */ -#if __BYTE_ORDER == __LITTLE_ENDIAN || !_STRING_ARCH_unaligned +#if __BYTE_ORDER == __LITTLE_ENDIAN || !defined _STRING_ARCH_unaligned name_start = ('=' << 8) | *(const unsigned char *) name; #else name_start = '=' | ((*(const unsigned char *) name) << 8); #endif for (ep = __environ; *ep != NULL; ++ep) { -#if _STRING_ARCH_unaligned +#ifdef _STRING_ARCH_unaligned uint16_t ep_start = *(uint16_t *) *ep; #else uint16_t ep_start = (((unsigned char *) *ep)[0] @@ -64,7 +64,7 @@ getenv (name) } else { -#if _STRING_ARCH_unaligned +#ifdef _STRING_ARCH_unaligned name_start = *(const uint16_t *) name; #else name_start = (((const unsigned char *) name)[0] @@ -75,7 +75,7 @@ getenv (name) for (ep = __environ; *ep != NULL; ++ep) { -#if _STRING_ARCH_unaligned +#ifdef _STRING_ARCH_unaligned uint16_t ep_start = *(uint16_t *) *ep; #else uint16_t ep_start = (((unsigned char *) *ep)[0] diff --git a/string/bits/string2.h b/string/bits/string2.h index 1b6a1ef..6cb0c4f 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -46,7 +46,7 @@ # endif #endif -#if _STRING_ARCH_unaligned +#ifdef _STRING_ARCH_unaligned /* If we can do unaligned memory accesses we must know the endianess. */ # include # include @@ -95,7 +95,7 @@ __STRING2_COPY_TYPE (8); /* Set N bytes of S to C. */ #if !defined _HAVE_STRING_ARCH_memset # if !__GNUC_PREREQ (3, 0) -# if _STRING_ARCH_unaligned +# ifdef _STRING_ARCH_unaligned # define memset(s, c, n) \ (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ ? ((n) == 1 \ @@ -223,7 +223,7 @@ __STRING2_COPY_TYPE (8); # endif # if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES -# if _STRING_ARCH_unaligned +# ifdef _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __mempcpy_args(src) \ ((const char *) (src))[0], ((const char *) (src))[2], \ @@ -419,7 +419,7 @@ extern void *__rawmemchr (const void *__s, int __c); : strcpy (dest, src))) # endif -# if _STRING_ARCH_unaligned +# ifdef _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __strcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ @@ -598,7 +598,7 @@ __strcpy_small (char *__dest, # endif # if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES -# if _STRING_ARCH_unaligned +# ifdef _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __stpcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \