]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/bind.c
StdLib: Fix more GCC warnings/errors caused by variables being set but not used.
[mirror_edk2.git] / StdLib / BsdSocketLib / bind.c
index f544c94a4731be7180d61734eb29a0f85a147fcc..a52272d7ce598949f28664946d831424b2011b4a 100644 (file)
@@ -1,22 +1,19 @@
 /** @file\r
   Implement the bind API.\r
 \r
 /** @file\r
   Implement the bind API.\r
 \r
-  Copyright (c) 2011, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
 **/\r
 **/\r
-\r
 #include <SocketInternals.h>\r
 \r
 \r
 #include <SocketInternals.h>\r
 \r
 \r
-/**\r
-  Bind a name to a socket.\r
+/** Bind a name to a socket.\r
 \r
   The bind routine connects a name (network address) to a socket on the local machine.\r
 \r
 \r
   The bind routine connects a name (network address) to a socket on the local machine.\r
 \r
@@ -40,7 +37,6 @@
 \r
   @return     The bind routine returns zero (0) if successful and -1 upon failure.\r
               In the case of an error, ::errno contains more information.\r
 \r
   @return     The bind routine returns zero (0) if successful and -1 upon failure.\r
               In the case of an error, ::errno contains more information.\r
-\r
  **/\r
 int\r
 bind (\r
  **/\r
 int\r
 bind (\r
@@ -51,25 +47,19 @@ bind (
 {\r
   int BindStatus;\r
   EFI_SOCKET_PROTOCOL * pSocketProtocol;\r
 {\r
   int BindStatus;\r
   EFI_SOCKET_PROTOCOL * pSocketProtocol;\r
-  EFI_STATUS Status;\r
 \r
 \r
-  //\r
   //  Locate the context for this socket\r
   //  Locate the context for this socket\r
-  //\r
   pSocketProtocol = BslFdToSocketProtocol ( s, NULL, &errno );\r
   if ( NULL != pSocketProtocol ) {\r
   pSocketProtocol = BslFdToSocketProtocol ( s, NULL, &errno );\r
   if ( NULL != pSocketProtocol ) {\r
-    //\r
+\r
     //  Bind the socket\r
     //  Bind the socket\r
-    //\r
-    Status = pSocketProtocol->pfnBind ( pSocketProtocol,\r
+    (void) pSocketProtocol->pfnBind ( pSocketProtocol,\r
                                         name,\r
                                         namelen,\r
                                         &errno );\r
   }\r
 \r
                                         name,\r
                                         namelen,\r
                                         &errno );\r
   }\r
 \r
-  //\r
   //  Return the operation stauts\r
   //  Return the operation stauts\r
-  //\r
   BindStatus = ( 0 == errno ) ? 0 : -1;\r
   return BindStatus;\r
 }\r
   BindStatus = ( 0 == errno ) ? 0 : -1;\r
   return BindStatus;\r
 }\r