diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-10-30 01:05:22 +0000 |
---|---|---|
committer | darylm503 <darylm503@Edk2> | 2014-10-30 01:05:22 +0000 |
commit | 0e565888ee40264bfad5a700e0d62f4824d81c18 (patch) | |
tree | cc2842df141ff68b559f8faaf6182dbb49ed0dc8 /StdLib/BsdSocketLib/res_comp.c | |
parent | b07ae3d6073f9ec69ae4316b0832fc96325c01d4 (diff) | |
download | edk2-platforms-0e565888ee40264bfad5a700e0d62f4824d81c18.tar.xz |
StdLib: Fix GCC warnings/errors caused by variables being set but not used.
Removed variables that had no effect on code behavior.
Fifo.c::FIFO_Dequeue: Replaced instances of "Self->ElementSize" with preexisting variable "SizeOfElement".
IIOutilities.c::IIO_GetInChar: Fixed variable of wrong, but compatible, type and made updating of housekeeping variables dependent upon successful completion of reading from the buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/BsdSocketLib/res_comp.c')
-rw-r--r-- | StdLib/BsdSocketLib/res_comp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/StdLib/BsdSocketLib/res_comp.c b/StdLib/BsdSocketLib/res_comp.c index cddda3e150..7c327fac2e 100644 --- a/StdLib/BsdSocketLib/res_comp.c +++ b/StdLib/BsdSocketLib/res_comp.c @@ -1,3 +1,13 @@ +/** @file
+ Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
/*
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
@@ -168,7 +178,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 +195,8 @@ res_hnok( if (!middlechar(ch))
return (0);
}
- ppch = pch, pch = ch, ch = nch;
+ pch = ch;
+ ch = nch;
}
return (1);
}
|