Index: /trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/VBoxHDD.cpp	(revision 27366)
+++ /trunk/src/VBox/Devices/Storage/VBoxHDD.cpp	(revision 27367)
@@ -1705,5 +1705,4 @@
         {
             /* Error detected, but image opened. Close and delete image. */
-            int rc2;
             rc2 = pImage->Backend->pfnClose(pImage->pvBackendData, true);
             AssertRC(rc2);
@@ -2934,5 +2933,5 @@
             vdRemoveImageFromList(pDisk, pImage);
             /* Close image. */
-            int rc2 = pImage->Backend->pfnClose(pImage->pvBackendData, false);
+            rc2 = pImage->Backend->pfnClose(pImage->pvBackendData, false);
             if (RT_FAILURE(rc2) && RT_SUCCESS(rc))
                 rc = rc2;
@@ -3393,6 +3392,6 @@
 
                 /* Cache new geometry values in any case. */
-                int rc2 = pImage->Backend->pfnGetPCHSGeometry(pImage->pvBackendData,
-                                                              &pDisk->PCHSGeometry);
+                rc2 = pImage->Backend->pfnGetPCHSGeometry(pImage->pvBackendData,
+                                                          &pDisk->PCHSGeometry);
                 if (RT_FAILURE(rc2))
                 {
@@ -3561,6 +3560,6 @@
 
                 /* Cache new geometry values in any case. */
-                int rc2 = pImage->Backend->pfnGetLCHSGeometry(pImage->pvBackendData,
-                                                              &pDisk->LCHSGeometry);
+                rc2 = pImage->Backend->pfnGetLCHSGeometry(pImage->pvBackendData,
+                                                          &pDisk->LCHSGeometry);
                 if (RT_FAILURE(rc2))
                 {
