Index: MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
===================================================================
--- MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c	(revision 16423)
+++ MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c	(working copy)
@@ -616,7 +616,6 @@
   I2C_REQUEST                 *I2cRequest;
   LIST_ENTRY                  *EntryHeader;
   LIST_ENTRY                  *Entry;
-  EFI_STATUS                  Status;
 
   //
   // Mark this I2C bus configuration management operation as complete
@@ -665,13 +664,13 @@
   //
   // Start an I2C operation on the host, the status is returned by I2cHostContext->Status
   //
-  Status = I2cMaster->StartRequest ( 
-                        I2cMaster,
-                        I2cRequest->SlaveAddress,
-                        I2cRequest->RequestPacket,
-                        I2cHostContext->I2cEvent,
-                        &I2cHostContext->Status
-                        );
+  I2cMaster->StartRequest ( 
+               I2cMaster,
+               I2cRequest->SlaveAddress,
+               I2cRequest->RequestPacket,
+               I2cHostContext->I2cEvent,
+               &I2cHostContext->Status
+               );
 }
 
 /**
Index: MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
===================================================================
--- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c	(revision 16423)
+++ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c	(working copy)
@@ -852,7 +852,6 @@
   IN OUT EFI_DEVICE_PATH_PROTOCOL                    **DevicePath
   )
 {
-  NVME_CONTROLLER_PRIVATE_DATA   *Private;
   NVME_NAMESPACE_DEVICE_PATH     *Node;
 
   //
@@ -862,8 +861,6 @@
     return EFI_INVALID_PARAMETER;
   }
 
-  Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (This);
-
   if (NamespaceId == 0) {
     return EFI_NOT_FOUND;
   }
Index: MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
===================================================================
--- MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c	(revision 16423)
+++ MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c	(working copy)
@@ -184,7 +184,6 @@
   )
 {
   UINTN                 PciLibAddress;
-  UINTN                 PrimaryBusNumber;
   UINTN                 BusNumber;
   UINTN                 SubordinateBusNumber;
   UINT32                ParentIoBase;
@@ -233,7 +232,6 @@
     //
     // Retrieve and verify the bus numbers in the PCI to PCI Bridge
     //
-    PrimaryBusNumber     = PciRead8 (PciLibAddress + PCI_BRIDGE_PRIMARY_BUS_REGISTER_OFFSET);
     BusNumber            = PciRead8 (PciLibAddress + PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET);
     SubordinateBusNumber = PciRead8 (PciLibAddress + PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET);
     if (BusNumber == 0 || BusNumber > SubordinateBusNumber) {
Index: MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
===================================================================
--- MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c	(revision 16423)
+++ MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c	(working copy)
@@ -1765,8 +1765,8 @@
                   NULL
                   );
 
-        ((EFI_IP4_CONFIG_DATA*) IpConfigData)->StationAddress = Ip4ModeData.ConfigData.StationAddress;
-        ((EFI_IP4_CONFIG_DATA*) IpConfigData)->SubnetMask     = Ip4ModeData.ConfigData.SubnetMask;
+        IP4_COPY_ADDRESS (&((EFI_IP4_CONFIG_DATA*) IpConfigData)->StationAddress, &Ip4ModeData.ConfigData.StationAddress);
+        IP4_COPY_ADDRESS (&((EFI_IP4_CONFIG_DATA*) IpConfigData)->SubnetMask, &Ip4ModeData.ConfigData.SubnetMask);
     }
 
       CopyMem (
Index: MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c
===================================================================
--- MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c	(revision 16423)
+++ MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c	(working copy)
@@ -960,7 +960,6 @@
   UINT8                          *DestPtr;
   UINTN                          DestLength;
   UINT8                          *RelocPtr;
-  UINT64                         *AddDataPtr;
   UINTN                          CapsuleTimes; 
   UINT64                         SizeLeft; 
   UINT64                         CapsuleImageSize; 
@@ -986,7 +985,6 @@
   CapsuleTimes     = 0;
   CapsuleImageSize = 0;
   PrivateDataPtr   = NULL;
-  AddDataPtr       = NULL;
   CapsuleHeader    = NULL;
   CapsuleBeginFlag = TRUE;
   CapsuleSize      = 0;
Index: MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
===================================================================
--- MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c	(revision 16423)
+++ MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c	(working copy)
@@ -847,7 +847,7 @@
     return FALSE;
   }
 
-  *Output                         = TerminalDevice->EfiKeyFiFo->Data[Head];
+  CopyMem (Output, &TerminalDevice->EfiKeyFiFo->Data[Head], sizeof (EFI_INPUT_KEY));
 
   TerminalDevice->EfiKeyFiFo->Head = (UINT8) ((Head + 1) % (FIFO_MAX_NUMBER + 1));
 
Index: MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
===================================================================
--- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c	(revision 16423)
+++ MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c	(working copy)
@@ -305,8 +305,8 @@
   UdpConfig.ReceiveTimeout     = 0;
   UdpConfig.TransmitTimeout    = 0;
   UdpConfig.UseDefaultAddress  = Config->UseDefaultSetting;
-  UdpConfig.StationAddress     = Config->StationIp;
-  UdpConfig.SubnetMask         = Config->SubnetMask;
+  CopyMem (&UdpConfig.StationAddress, &Config->StationIp, sizeof (EFI_IPv4_ADDRESS));
+  CopyMem (&UdpConfig.SubnetMask, &Config->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
   UdpConfig.StationPort        = 0;
   UdpConfig.RemotePort         = 0;
 
Index: MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c
===================================================================
--- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c	(revision 16423)
+++ MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c	(working copy)
@@ -413,8 +413,8 @@
   UdpConfig.ReceiveTimeout     = 0;
   UdpConfig.TransmitTimeout    = 0;
   UdpConfig.UseDefaultAddress  = Config->UseDefaultSetting;
-  UdpConfig.StationAddress     = Config->StationIp;
-  UdpConfig.SubnetMask         = Config->SubnetMask;
+  CopyMem (&UdpConfig.StationAddress, &Config->StationIp, sizeof (EFI_IPv4_ADDRESS));
+  CopyMem (&UdpConfig.SubnetMask, &Config->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
   UdpConfig.StationPort        = Instance->McastPort;
   UdpConfig.RemotePort         = 0;
 
Index: MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
===================================================================
--- MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c	(revision 16423)
+++ MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c	(working copy)
@@ -102,7 +102,7 @@
     AccessPoint->UseDefaultAddress  = Tcb->UseDefaultAddr;
 
     CopyMem (&AccessPoint->StationAddress, &Tcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
-    AccessPoint->SubnetMask         = Tcb->SubnetMask;
+    CopyMem (&AccessPoint->SubnetMask, &Tcb->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
     AccessPoint->StationPort        = NTOHS (Tcb->LocalEnd.Port);
 
     CopyMem (&AccessPoint->RemoteAddress, &Tcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
@@ -458,7 +458,7 @@
 
   CopyMem (&Tcb->LocalEnd.Ip, &CfgData->AccessPoint.StationAddress, sizeof (IP4_ADDR));
   Tcb->LocalEnd.Port  = HTONS (CfgData->AccessPoint.StationPort);
-  Tcb->SubnetMask     = CfgData->AccessPoint.SubnetMask;
+  CopyMem (&Tcb->SubnetMask, &CfgData->AccessPoint.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
 
   if (CfgData->AccessPoint.ActiveFlag) {
     CopyMem (&Tcb->RemoteEnd.Ip, &CfgData->AccessPoint.RemoteAddress, sizeof (IP4_ADDR));
Index: MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
===================================================================
--- MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c	(revision 16423)
+++ MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c	(working copy)
@@ -227,8 +227,8 @@
       // Save the configuration data.
       //
       CopyMem (&Instance->ConfigData, UdpConfigData, sizeof (Instance->ConfigData));
-      Instance->ConfigData.StationAddress = Ip4ConfigData.StationAddress;
-      Instance->ConfigData.SubnetMask     = Ip4ConfigData.SubnetMask;
+      CopyMem (&Instance->ConfigData.StationAddress, &Ip4ConfigData.StationAddress, sizeof (EFI_IPv4_ADDRESS));
+      CopyMem (&Instance->ConfigData.SubnetMask, &Ip4ConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
 
       //
       // Try to allocate the required port resource.
@@ -588,7 +588,7 @@
   Udp4Header->Checksum     = 0;
 
   UdpSessionData = TxData->UdpSessionData;
-  Override.Ip4OverrideData.SourceAddress = ConfigData->StationAddress;
+  CopyMem (&Override.Ip4OverrideData.SourceAddress, &ConfigData->StationAddress, sizeof (EFI_IPv4_ADDRESS));
 
   if (UdpSessionData != NULL) {
     //
