From patchwork Wed Oct 29 10:00:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Martin X-Patchwork-Id: 39735 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05EFC24046 for ; Wed, 29 Oct 2014 10:01:18 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gq15sf1468010lab.6 for ; Wed, 29 Oct 2014 03:01:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:reply-to:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=u0xIcfJNDRzbMuj9rsJ1N41m4ONWUSMyAI+5q0uAkM0=; b=CcyhSO5RqsxmjVAv3N25Gd4UN/QEZPx38NpSjSPB1pM26YXU7JPLSMfuP4B5AaXbVZ NM+xQPVcRx6Wt0hpUSLS/oYRVcR2es7wqlnLbeUH208W2OMlx9OBGWMVSA1QbCp2jRy7 7nGBm6I4su3ULPYO0A4avBiKD6WsZn1jy8CCjqCQNdC/+sQylTeIAB+obJyZjlRLMUpv Gkj+/uFoFHb/7IoF5KdPcia/w7d/fKPYlJrPU33+lP05ycw6sQX5RxYOc/7jDeIMK4V7 /S9CbQcYd4PhzWFd/bXFcd7eygWnGuHYYjRZyLIGCIlshLNCaajWglo4BSRW8h1vG782 Wv0g== X-Gm-Message-State: ALoCoQlYVDmpm1j2GIsXxOdOhWElM9nAO90bi8sG+E1XmlW+UgyUBQqaPPjDDTCTecLga8oFQiVU X-Received: by 10.152.1.133 with SMTP id 5mr114104lam.8.1414576877895; Wed, 29 Oct 2014 03:01:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.97 with SMTP id p1ls144501laj.87.gmail; Wed, 29 Oct 2014 03:01:17 -0700 (PDT) X-Received: by 10.112.125.106 with SMTP id mp10mr10379577lbb.50.1414576877506; Wed, 29 Oct 2014 03:01:17 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id n9si6516642laa.10.2014.10.29.03.01.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id l4so2140851lbv.14 for ; Wed, 29 Oct 2014 03:01:17 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr10090854lbw.66.1414576877125; Wed, 29 Oct 2014 03:01:17 -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.112.84.229 with SMTP id c5csp628680lbz; Wed, 29 Oct 2014 03:01:15 -0700 (PDT) X-Received: by 10.107.4.2 with SMTP id 2mr10767171ioe.44.1414576875215; Wed, 29 Oct 2014 03:01:15 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id h20si6066202icm.81.2014.10.29.03.01.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XjQ3s-0007hh-CG; Wed, 29 Oct 2014 10:01:04 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XjQ3q-0007hD-J1 for edk2-devel@lists.sourceforge.net; Wed, 29 Oct 2014 10:01:02 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of arm.com designates 217.140.96.21 as permitted sender) client-ip=217.140.96.21; envelope-from=olivier.martin@arm.com; helo=cam-smtp0.cambridge.arm.com; Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XjQ3o-0002U8-IP for edk2-devel@lists.sourceforge.net; Wed, 29 Oct 2014 10:01:02 +0000 Received: from e102605-lin.cambridge.arm.com (e102605-lin.cambridge.arm.com [10.1.193.159]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s9TA0nke001327; Wed, 29 Oct 2014 10:00:49 GMT From: Olivier Martin To: daryl.mcdaniel@intel.com Date: Wed, 29 Oct 2014 10:00:38 +0000 Message-Id: <1414576838-30522-1-git-send-email-olivier.martin@arm.com> X-Mailer: git-send-email 2.1.1 X-Spam-Score: -2.1 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XjQ3o-0002U8-IP Cc: edk2-devel@lists.sourceforge.net Subject: [edk2] [PATCH] StdLib/LibC: Removed/Fixed unused variable to build with GCC X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: olivier.martin@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Some of the variables are unused that trigger a GCC warning/error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- StdLib/BsdSocketLib/bind.c | 3 +++ StdLib/BsdSocketLib/getnameinfo.c | 8 ++++++-- StdLib/BsdSocketLib/getsockopt.c | 3 +++ StdLib/BsdSocketLib/listen.c | 3 +++ StdLib/BsdSocketLib/poll.c | 3 +++ StdLib/BsdSocketLib/res_comp.c | 4 ++-- StdLib/BsdSocketLib/res_mkupdate.c | 3 +-- StdLib/BsdSocketLib/res_update.c | 4 ---- StdLib/BsdSocketLib/setsockopt.c | 3 +++ StdLib/EfiSocketLib/Ip4.c | 12 ------------ StdLib/EfiSocketLib/Socket.c | 1 + StdLib/EfiSocketLib/Tcp4.c | 4 ---- StdLib/EfiSocketLib/Tcp6.c | 4 ---- StdLib/LibC/Containers/Queues/Fifo.c | 2 -- StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c | 10 ++++++---- StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c | 3 --- StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c | 3 +-- StdLib/LibC/Uefi/writev.c | 4 ++-- 18 files changed, 34 insertions(+), 43 deletions(-) diff --git a/StdLib/BsdSocketLib/bind.c b/StdLib/BsdSocketLib/bind.c index f544c94..f22fe2f 100644 --- a/StdLib/BsdSocketLib/bind.c +++ b/StdLib/BsdSocketLib/bind.c @@ -65,6 +65,9 @@ bind ( name, namelen, &errno ); + if (EFI_ERROR (Status)) { + errno = -1; + } } // diff --git a/StdLib/BsdSocketLib/getnameinfo.c b/StdLib/BsdSocketLib/getnameinfo.c index fab3460..0318d93 100644 --- a/StdLib/BsdSocketLib/getnameinfo.c +++ b/StdLib/BsdSocketLib/getnameinfo.c @@ -411,15 +411,19 @@ ip6_sa2str( int flags ) { - unsigned int ifindex; +#if 0 + unsigned int ifindex; const struct in6_addr *a6; +#endif int n; _DIAGASSERT(sa6 != NULL); _DIAGASSERT(buf != NULL); - ifindex = (unsigned int)sa6->sin6_scope_id; +#if 0 + ifindex = (unsigned int)sa6->sin6_scope_id; a6 = &sa6->sin6_addr; +#endif #ifdef NI_NUMERICSCOPE if ((flags & NI_NUMERICSCOPE) != 0) { diff --git a/StdLib/BsdSocketLib/getsockopt.c b/StdLib/BsdSocketLib/getsockopt.c index 47b7c6f..fdbd6f7 100644 --- a/StdLib/BsdSocketLib/getsockopt.c +++ b/StdLib/BsdSocketLib/getsockopt.c @@ -60,6 +60,9 @@ getsockopt ( option_value, option_len, &errno ); + if (EFI_ERROR (Status)) { + errno = -1; + } } // diff --git a/StdLib/BsdSocketLib/listen.c b/StdLib/BsdSocketLib/listen.c index 7c6d5f3..d3060a4 100644 --- a/StdLib/BsdSocketLib/listen.c +++ b/StdLib/BsdSocketLib/listen.c @@ -58,6 +58,9 @@ listen ( Status = pSocketProtocol->pfnListen ( pSocketProtocol, backlog, &errno ); + if (EFI_ERROR (Status)) { + errno = -1; + } } // diff --git a/StdLib/BsdSocketLib/poll.c b/StdLib/BsdSocketLib/poll.c index dc17567..dcc367a 100644 --- a/StdLib/BsdSocketLib/poll.c +++ b/StdLib/BsdSocketLib/poll.c @@ -49,6 +49,9 @@ BslSocketPoll ( Events, &DetectedEvents, &errno ); + if (EFI_ERROR (Status)) { + errno = -1; + } } // diff --git a/StdLib/BsdSocketLib/res_comp.c b/StdLib/BsdSocketLib/res_comp.c index cddda3e..7b5f2aa 100644 --- a/StdLib/BsdSocketLib/res_comp.c +++ b/StdLib/BsdSocketLib/res_comp.c @@ -168,7 +168,7 @@ res_hnok( const char *dn ) { - int ppch = '\0', pch = PERIOD, ch = *dn++; + int pch = PERIOD, ch = *dn++; while (ch != '\0') { int nch = *dn++; @@ -185,7 +185,7 @@ res_hnok( if (!middlechar(ch)) return (0); } - ppch = pch, pch = ch, ch = nch; + pch = ch, ch = nch; } return (1); } diff --git a/StdLib/BsdSocketLib/res_mkupdate.c b/StdLib/BsdSocketLib/res_mkupdate.c index 3201f31..1056fc6 100644 --- a/StdLib/BsdSocketLib/res_mkupdate.c +++ b/StdLib/BsdSocketLib/res_mkupdate.c @@ -100,7 +100,7 @@ int res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { ns_updrec *rrecp_start = rrecp_in; HEADER *hp; - u_char *cp, *sp1, *sp2, *startp, *endp; + u_char *cp, *sp2, *startp, *endp; int n, i, soanum, multiline; ns_updrec *rrecp; struct in_addr ina; @@ -125,7 +125,6 @@ res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { hp->id = htons(++_res.id); hp->opcode = ns_o_update; hp->rcode = NOERROR; - sp1 = buf + 2*INT16SZ; /* save pointer to zocount */ cp = buf + HFIXEDSZ; buflen -= HFIXEDSZ; dpp = dnptrs; diff --git a/StdLib/BsdSocketLib/res_update.c b/StdLib/BsdSocketLib/res_update.c index a01d832..f3ff0ce 100644 --- a/StdLib/BsdSocketLib/res_update.c +++ b/StdLib/BsdSocketLib/res_update.c @@ -120,7 +120,6 @@ res_update(ns_updrec *rrecp_in) { int i, j, k = 0, n, ancount, nscount, arcount, rcode, rdatasize, newgroup, done, myzone, seen_before, numzones = 0; u_int16_t dlen, class, qclass, type, qtype; - u_int32_t ttl; if ((_res.options & RES_INIT) == 0 && res_init() == -1) { h_errno = NETDB_INTERNAL; @@ -302,7 +301,6 @@ res_update(ns_updrec *rrecp_in) { if (cp + INT32SZ + INT16SZ > eom) return (-1); /* continue processing the soa record */ - GETLONG(ttl, cp); GETSHORT(dlen, cp); if (cp + dlen > eom) return (-1); @@ -424,7 +422,6 @@ ans=%d, auth=%d, add=%d, rcode=%d\n", return (-1); GETSHORT(type, cp); GETSHORT(class, cp); - GETLONG(ttl, cp); GETSHORT(dlen, cp); if (cp + dlen > eom) return (-1); @@ -450,7 +447,6 @@ ans=%d, auth=%d, add=%d, rcode=%d\n", return (-1); GETSHORT(type, cp); GETSHORT(class, cp); - GETLONG(ttl, cp); GETSHORT(dlen, cp); if (cp + dlen > eom) return (-1); diff --git a/StdLib/BsdSocketLib/setsockopt.c b/StdLib/BsdSocketLib/setsockopt.c index 64f3a35..7db7dea 100644 --- a/StdLib/BsdSocketLib/setsockopt.c +++ b/StdLib/BsdSocketLib/setsockopt.c @@ -59,6 +59,9 @@ setsockopt ( option_value, option_len, &errno ); + if (EFI_ERROR (Status)) { + errno = -1; + } } // diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c index ed71194..46425db 100644 --- a/StdLib/EfiSocketLib/Ip4.c +++ b/StdLib/EfiSocketLib/Ip4.c @@ -242,8 +242,6 @@ EslIp4OptionSet ( ) { BOOLEAN bTrueFalse; - socklen_t LengthInBytes; - UINT8 * pOptionData; EFI_STATUS Status; DBG_ENTER ( ); @@ -257,8 +255,6 @@ EslIp4OptionSet ( // // Determine if the option protocol matches // - LengthInBytes = 0; - pOptionData = NULL; switch ( OptionName ) { default: // @@ -283,12 +279,6 @@ EslIp4OptionSet ( bTrueFalse = FALSE; } pOptionValue = &bTrueFalse; - - // - // Set the option value - // - pOptionData = (UINT8 *)&pSocket->bIncludeHeader; - LengthInBytes = sizeof ( pSocket->bIncludeHeader ); } break; } @@ -653,7 +643,6 @@ EslIp4RxComplete ( ) { size_t LengthInBytes; - ESL_PORT * pPort; ESL_PACKET * pPacket; EFI_IP4_RECEIVE_DATA * pRxData; EFI_STATUS Status; @@ -663,7 +652,6 @@ EslIp4RxComplete ( // // Get the operation status. // - pPort = pIo->pPort; Status = pIo->Token.Ip4Rx.Status; // diff --git a/StdLib/EfiSocketLib/Socket.c b/StdLib/EfiSocketLib/Socket.c index d53473e..740602d 100644 --- a/StdLib/EfiSocketLib/Socket.c +++ b/StdLib/EfiSocketLib/Socket.c @@ -4130,6 +4130,7 @@ EslSocketPortCloseComplete ( // Status = EslSocketPortCloseRxDone ( pPort ); DBG_EXIT_STATUS ( Status ); + ASSERT_EFI_ERROR (Status); } diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c index 7ece38d..0419ee2 100644 --- a/StdLib/EfiSocketLib/Tcp4.c +++ b/StdLib/EfiSocketLib/Tcp4.c @@ -840,7 +840,6 @@ EslTcp4ListenComplete ( EFI_HANDLE ChildHandle; struct sockaddr_in LocalAddress; EFI_TCP4_CONFIG_DATA * pConfigData; - ESL_LAYER * pLayer; ESL_PORT * pNewPort; ESL_SOCKET * pNewSocket; ESL_SOCKET * pSocket; @@ -869,7 +868,6 @@ EslTcp4ListenComplete ( // Allocate a socket for this connection // ChildHandle = NULL; - pLayer = &mEslLayer; Status = EslSocketAllocate ( &ChildHandle, DEBUG_CONNECTION, &pNewSocket ); @@ -1924,7 +1922,6 @@ EslTcp4TxBuffer ( ESL_PACKET ** ppQueueHead; ESL_PACKET ** ppQueueTail; ESL_PACKET * pPreviousPacket; - ESL_TCP4_CONTEXT * pTcp4; size_t * pTxBytes; EFI_TCP4_TRANSMIT_DATA * pTxData; EFI_STATUS Status; @@ -1951,7 +1948,6 @@ EslTcp4TxBuffer ( // // Determine the queue head // - pTcp4 = &pPort->Context.Tcp4; bUrgent = (BOOLEAN)( 0 != ( Flags & MSG_OOB )); bUrgentQueue = bUrgent && ( !pSocket->bOobInLine ) diff --git a/StdLib/EfiSocketLib/Tcp6.c b/StdLib/EfiSocketLib/Tcp6.c index 21c4109..77a4a4c 100644 --- a/StdLib/EfiSocketLib/Tcp6.c +++ b/StdLib/EfiSocketLib/Tcp6.c @@ -871,7 +871,6 @@ EslTcp6ListenComplete ( EFI_HANDLE ChildHandle; struct sockaddr_in6 LocalAddress; EFI_TCP6_CONFIG_DATA * pConfigData; - ESL_LAYER * pLayer; ESL_PORT * pNewPort; ESL_SOCKET * pNewSocket; ESL_SOCKET * pSocket; @@ -900,7 +899,6 @@ EslTcp6ListenComplete ( // Allocate a socket for this connection // ChildHandle = NULL; - pLayer = &mEslLayer; Status = EslSocketAllocate ( &ChildHandle, DEBUG_CONNECTION, &pNewSocket ); @@ -1993,7 +1991,6 @@ EslTcp6TxBuffer ( ESL_PACKET ** ppQueueHead; ESL_PACKET ** ppQueueTail; ESL_PACKET * pPreviousPacket; - ESL_TCP6_CONTEXT * pTcp6; size_t * pTxBytes; EFI_TCP6_TRANSMIT_DATA * pTxData; EFI_STATUS Status; @@ -2020,7 +2017,6 @@ EslTcp6TxBuffer ( // // Determine the queue head // - pTcp6 = &pPort->Context.Tcp6; bUrgent = (BOOLEAN)( 0 != ( Flags & MSG_OOB )); bUrgentQueue = bUrgent && ( !pSocket->bOobInLine ) diff --git a/StdLib/LibC/Containers/Queues/Fifo.c b/StdLib/LibC/Containers/Queues/Fifo.c index 73254d2..93b62f8 100644 --- a/StdLib/LibC/Containers/Queues/Fifo.c +++ b/StdLib/LibC/Containers/Queues/Fifo.c @@ -278,7 +278,6 @@ FIFO_Dequeue ( { UINTN QPtr; UINT32 RDex; - UINT32 SizeOfElement; UINT32 i; assert(Self != NULL); @@ -289,7 +288,6 @@ FIFO_Dequeue ( } else { RDex = Self->ReadIndex; // Get this FIFO's Read Index - SizeOfElement = Self->ElementSize; // Get size of this FIFO's elements Count = MIN(Count, Self->Count(Self, AsElements)); // Lesser of requested or actual QPtr = (UINTN)Self->Queue + (RDex * Self->ElementSize); // Point to Read location in FIFO diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c index 1c978ea..b498d2b 100644 --- a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c +++ b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c @@ -75,7 +75,7 @@ IIO_GetInChar ( { cIIO *This; cFIFO *InBuf; - EFI_STATUS Status; + size_t Status; ssize_t NumRead; wint_t RetVal; wchar_t InChar; @@ -92,8 +92,10 @@ IIO_GetInChar ( } if(BufCnt > 0) { Status = InBuf->Read(InBuf, &InChar, 1); - --BufCnt; - NumRead = 1; + if (Status > 0) { + --BufCnt; + NumRead = 1; + } } else { NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar); @@ -104,7 +106,7 @@ IIO_GetInChar ( else { RetVal = (wint_t)InChar; } - return InChar; + return RetVal; } /** Get the current cursor position. diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c b/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c index 927f4f4..2c5e81d 100644 --- a/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c +++ b/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c @@ -63,7 +63,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh) UINT32 CurRow; // Current cursor row on the screen UINT32 PrevColumn; // Previous column. Used to detect wrapping. UINT32 AdjColumn; // Current cursor column on the screen - UINT32 AdjRow; // Current cursor row on the screen RetVal = -1; wcb = wc; @@ -79,7 +78,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh) CurRow = This->CurrentXY.Row; numW = 1; // The majority of characters buffer one character - AdjRow = 0; // Most characters just cause horizontal movement AdjColumn = 0; if(OFlag & OPOST) { /* Perform output processing */ @@ -127,7 +125,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh) numW = 2; CurColumn = 0; } - AdjRow = 1; break; //}} case CHAR_BACKSPACE: //{{ diff --git a/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c b/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c index bcae9c8..3b226d1 100644 --- a/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c +++ b/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c @@ -37,7 +37,6 @@ IIO_NonCanonRead ( cIIO *This; cFIFO *InBuf; struct termios *Termio; - EFI_STATUS Status; ssize_t NumRead; cc_t tioMin; cc_t tioTime; @@ -74,7 +73,7 @@ IIO_NonCanonRead ( if(InBuf->IsEmpty(InBuf)) { NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar); if(NumRead > 0) { - Status = InBuf->Write(InBuf, &InChar, 1); // Buffer the character + InBuf->Write(InBuf, &InChar, 1); // Buffer the character } } // break; diff --git a/StdLib/LibC/Uefi/writev.c b/StdLib/LibC/Uefi/writev.c index 9cff086..56712c5 100644 --- a/StdLib/LibC/Uefi/writev.c +++ b/StdLib/LibC/Uefi/writev.c @@ -101,7 +101,7 @@ writev( ) { const struct iovec *pVecTmp; - char *pBuf, *pBufTmp; + char *pBuf; size_t TotalBytes, i, ret; // @@ -126,7 +126,7 @@ writev( // Copy vectors to the buffer // - for (pBufTmp = pBuf; iovcnt; iovcnt--) { + for (; iovcnt; iovcnt--) { bcopy(iov->iov_base, pBuf, iov->iov_len); pBuf += iov->iov_len; iov++;