[BTRFS]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 9 May 2016 09:10:13 +0000 (09:10 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 9 May 2016 09:10:13 +0000 (09:10 +0000)
- Fix warnings

svn path=/trunk/; revision=71298

reactos/drivers/filesystems/btrfs/CMakeLists.txt
reactos/drivers/filesystems/btrfs/create.c
reactos/drivers/filesystems/btrfs/fileinfo.c
reactos/drivers/filesystems/btrfs/read.c
reactos/drivers/filesystems/btrfs/write.c

index cd3d68d..b39737e 100644 (file)
@@ -25,12 +25,6 @@ list(APPEND SOURCE
 
 add_library(btrfs SHARED ${SOURCE} btrfs.rc)
 
-if(NOT MSVC)
-    replace_compile_flags("-Werror" " ")
-else()
-    replace_compile_flags("/we\"4189\"" " ")
-endif()
-
 add_definitions(-D__KERNEL__)
 set_module_type(btrfs kernelmodedriver)
 target_link_libraries(btrfs ntoskrnl_vista ${PSEH_LIB})
index 5a3c4b7..e428fef 100644 (file)
@@ -15,7 +15,9 @@
  * You should have received a copy of the GNU Lesser General Public Licence
  * along with WinBtrfs.  If not, see <http://www.gnu.org/licenses/>. */
 
+#ifndef __REACTOS__
 #include <sys/stat.h>
+#endif /* __REACTOS__ */
 #include "btrfs_drv.h"
 
 extern PDEVICE_OBJECT devobj;
index 5f6ee5e..02221d4 100644 (file)
@@ -2984,6 +2984,7 @@ end:
     return Status;
 }
 
+#ifndef __REACTOS__
 static NTSTATUS STDCALL fill_in_file_standard_link_information(FILE_STANDARD_LINK_INFORMATION* fsli, fcb* fcb, file_ref* fileref, LONG* length) {
     TRACE("FileStandardLinkInformation\n");
     
@@ -2998,6 +2999,7 @@ static NTSTATUS STDCALL fill_in_file_standard_link_information(FILE_STANDARD_LIN
     
     return STATUS_SUCCESS;
 }
+#endif /* __REACTOS__ */
 
 typedef struct {
     UNICODE_STRING name;
@@ -3280,6 +3282,7 @@ end:
     return Status;
 }
 
+#ifndef __REACTOS__
 static NTSTATUS STDCALL fill_in_hard_link_information(FILE_LINKS_INFORMATION* fli, fcb* fcb, LONG* length) {
     KEY searchkey;
     traverse_ptr tp, next_tp;
@@ -3465,6 +3468,7 @@ end:
     }
     return Status;
 }
+#endif /* __REACTOS__ */
 
 static NTSTATUS STDCALL query_info(device_extension* Vcb, PFILE_OBJECT FileObject, PIRP Irp) {
     PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
index a0a12d9..9cbe204 100644 (file)
@@ -602,7 +602,7 @@ NTSTATUS STDCALL drv_read(PDEVICE_OBJECT DeviceObject, PIRP Irp) {
         
         Status = STATUS_SUCCESS;
         
-        try {
+        _SEH2_TRY {
             if (!FileObject->PrivateCacheMap) {
                 CC_FILE_SIZES ccfs;
                 
@@ -635,9 +635,9 @@ NTSTATUS STDCALL drv_read(PDEVICE_OBJECT DeviceObject, PIRP Irp) {
                 }
                 TRACE("CcCopyRead finished\n");
             }
-        } except (EXCEPTION_EXECUTE_HANDLER) {
-            Status = GetExceptionCode();
-        }
+        } _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER) {
+            Status = _SEH2_GetExceptionCode();
+        } _SEH2_END;
         
         if (NT_SUCCESS(Status)) {
             Status = Irp->IoStatus.Status;
index f723c63..293182c 100644 (file)
@@ -3086,6 +3086,9 @@ static NTSTATUS STDCALL do_splits(device_extension* Vcb, LIST_ENTRY* rollback) {
                     if (t->parent) {
                         LIST_ENTRY* le2;
                         KEY firstitem = {0xcccccccccccccccc,0xcc,0xcccccccccccccccc};
+#ifdef __REACTOS__
+                        (void)firstitem;
+#endif
                         
                         done_deletions = TRUE;