summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Ip4Dxe
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:05 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:05 +0000
commit7538d53684792266c37e91f11a3ce2b7fb1e32d9 (patch)
tree1a82491c7ef95953283429136bde44ed621ed944 /MdeModulePkg/Universal/Network/Ip4Dxe
parent310580cf8a9656e3990b7d58fafdc0ce62b9b61f (diff)
downloadedk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.zip
edk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.tar.gz
edk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.tar.bz2
MdeModulePkg: Remove variables that are set, but not used
GCC 4.6 generates a warning when a variable is set, but never used. Signed-off-by: jljusten Reviewed-by: lgao4 Reviewed-by: erictian Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12617 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c
index 023733b..6a92573 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c
@@ -1,7 +1,7 @@
/** @file
IP4 option support functions.
-Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2011, 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
@@ -17,8 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Validate the IP4 option format for both the packets we received
- and will transmit. It will compute the ICMP error message fields
- if the option is mal-formated. But this information isn't used.
+ and will transmit.
@param[in] Option The first byte of the option
@param[in] OptionLen The length of the whole option
@@ -39,13 +38,6 @@ Ip4OptionIsValid (
UINT32 Cur;
UINT32 Len;
UINT32 Point;
- volatile UINT8 IcmpType;
- volatile UINT8 IcmpCode;
- volatile UINT32 IcmpPoint;
-
- IcmpType = ICMP_PARAMETER_PROBLEM;
- IcmpCode = 0;
- IcmpPoint = 0;
Cur = 0;
@@ -69,12 +61,10 @@ Ip4OptionIsValid (
// SRR/RR options are formatted as |Type|Len|Point|Ip1|Ip2|...
//
if ((OptionLen - Cur < Len) || (Len < 3) || ((Len - 3) % 4 != 0)) {
- IcmpPoint = Cur + 1;
return FALSE;
}
if ((Point > Len + 1) || (Point % 4 != 0)) {
- IcmpPoint = Cur + 2;
return FALSE;
}
@@ -86,8 +76,6 @@ Ip4OptionIsValid (
if ((Option[Cur] != IP4_OPTION_RR) &&
((Rcvd && (Point != Len + 1)) || (!Rcvd && (Point != 4)))) {
- IcmpType = ICMP_DEST_UNREACHABLE;
- IcmpCode = ICMP_SOURCEROUTE_FAILED;
return FALSE;
}
@@ -98,7 +86,6 @@ Ip4OptionIsValid (
Len = Option[Cur + 1];
if ((OptionLen - Cur < Len) || (Len < 2)) {
- IcmpPoint = Cur + 1;
return FALSE;
}