]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/setsockopt.c
StdLib: Fix more GCC warnings/errors caused by variables being set but not used.
[mirror_edk2.git] / StdLib / BsdSocketLib / setsockopt.c
index 64f3a359111fbc8cb7e9aec8316a229b699b7c7d..ce2b6aff43f5a38c0e42450bbecf070862c72cee 100644 (file)
@@ -1,22 +1,19 @@
 /** @file\r
   Implement the setsockopt 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
 **/\r
-\r
 #include <SocketInternals.h>\r
 \r
 \r
-/**\r
-  Set the socket options\r
+/** Set the socket options\r
 \r
   The\r
   <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html">POSIX</a>\r
@@ -30,7 +27,6 @@
 \r
   @return   This routine returns zero (0) upon success and -1 when an error occurs.\r
             In the case of an error, ::errno contains more details.\r
-\r
 **/\r
 int\r
 setsockopt (\r
@@ -43,27 +39,19 @@ setsockopt (
 {\r
   int OptionStatus;\r
   EFI_SOCKET_PROTOCOL * pSocketProtocol;\r
-  EFI_STATUS Status;\r
-  \r
-  //\r
+\r
   //  Locate the context for this socket\r
-  //\r
   pSocketProtocol = BslFdToSocketProtocol ( s, NULL, &errno );\r
   if ( NULL != pSocketProtocol ) {\r
-    //\r
     //  Set the socket option\r
-    //\r
-    Status = pSocketProtocol->pfnOptionSet ( pSocketProtocol,\r
-                                             level,\r
-                                             option_name,\r
-                                             option_value,\r
-                                             option_len,\r
-                                             &errno );\r
+    (void) pSocketProtocol->pfnOptionSet (pSocketProtocol,\r
+                                          level,\r
+                                          option_name,\r
+                                          option_value,\r
+                                          option_len,\r
+                                          &errno );\r
   }\r
-  \r
-  //\r
   //  Return the operation stauts\r
-  //\r
   OptionStatus = ( 0 == errno ) ? 0 : -1;\r
   return OptionStatus;\r
 }\r