[CDFS_NEW] Remove a no longer required build hack
[reactos.git] / drivers / filesystems / cdfs_new / wdk_wnet_to_ros.diff
1 Index: drivers/filesystems/cdfs_new/deviosup.c
2 ===================================================================
3 --- drivers/filesystems/cdfs_new/deviosup.c (revision 34615)
4 +++ drivers/filesystems/cdfs_new/deviosup.c (working copy)
5 @@ -165,6 +165,7 @@
6 );
7
8 NTSTATUS
9 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
10 CdMultiSyncCompletionRoutine (
11 IN PDEVICE_OBJECT DeviceObject,
12 IN PIRP Irp,
13 @@ -172,6 +173,7 @@
14 );
15
16 NTSTATUS
17 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
18 CdMultiAsyncCompletionRoutine (
19 IN PDEVICE_OBJECT DeviceObject,
20 IN PIRP Irp,
21 @@ -179,6 +181,7 @@
22 );
23
24 NTSTATUS
25 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
26 CdSingleSyncCompletionRoutine (
27 IN PDEVICE_OBJECT DeviceObject,
28 IN PIRP Irp,
29 @@ -186,6 +189,7 @@
30 );
31
32 NTSTATUS
33 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
34 CdSingleAsyncCompletionRoutine (
35 IN PDEVICE_OBJECT DeviceObject,
36 IN PIRP Irp,
37 @@ -2943,6 +2947,7 @@
38 //
39
40 NTSTATUS
41 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
42 CdMultiSyncCompletionRoutine (
43 IN PDEVICE_OBJECT DeviceObject,
44 IN PIRP Irp,
45 @@ -3029,6 +3034,7 @@
46 //
47
48 NTSTATUS
49 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
50 CdMultiAsyncCompletionRoutine (
51 IN PDEVICE_OBJECT DeviceObject,
52 IN PIRP Irp,
53 @@ -3066,7 +3072,8 @@
54
55 {
56 PCD_IO_CONTEXT IoContext = Context;
57 - PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp );
58 + /* ReactOS Change: GCC Unused Variable */
59 + //PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp );
60
61 AssertVerifyDeviceIrp( Irp );
62
63 @@ -3148,6 +3155,7 @@
64 //
65
66 NTSTATUS
67 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
68 CdSingleSyncCompletionRoutine (
69 IN PDEVICE_OBJECT DeviceObject,
70 IN PIRP Irp,
71 @@ -3207,6 +3215,7 @@
72 //
73
74 NTSTATUS
75 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
76 CdSingleAsyncCompletionRoutine (
77 IN PDEVICE_OBJECT DeviceObject,
78 IN PIRP Irp,
79 @@ -3267,7 +3276,7 @@
80 // and finally, free the context record.
81 //
82
83 - CdFreeIoContext( (PCD_IO_CONTEXT) Context );
84 + CdFreeIoContext( Context ); /* ReactOS Change: GCC "error: invalid lvalue in unary '&'" */
85 return STATUS_SUCCESS;
86
87 UNREFERENCED_PARAMETER( DeviceObject );
88 Index: drivers/filesystems/cdfs_new/dirctrl.c
89 ===================================================================
90 --- drivers/filesystems/cdfs_new/dirctrl.c (revision 34615)
91 +++ drivers/filesystems/cdfs_new/dirctrl.c (working copy)
92 @@ -209,7 +209,7 @@
93
94 ULONG BaseLength;
95
96 - PFILE_BOTH_DIR_INFORMATION DirInfo;
97 + PFILE_BOTH_DIR_INFORMATION DirInfo = NULL; /* ReactOS Change: GCC Uninit var */
98 PFILE_NAMES_INFORMATION NamesInfo;
99 PFILE_ID_FULL_DIR_INFORMATION IdFullDirInfo;
100 PFILE_ID_BOTH_DIR_INFORMATION IdBothDirInfo;
101 @@ -579,6 +579,9 @@
102 NamesInfo->FileNameLength = FileNameBytes + SeparatorBytes + VersionStringBytes;
103
104 break;
105 +
106 + /* ReactOS Change: GCC "enumeration value not handled in switch" */
107 + default: break;
108 }
109
110 //
111 Index: drivers/filesystems/cdfs_new/create.c
112 ===================================================================
113 --- drivers/filesystems/cdfs_new/create.c (revision 34615)
114 +++ drivers/filesystems/cdfs_new/create.c (working copy)
115 @@ -2106,7 +2106,7 @@
116 PFCB NextFcb;
117 PFCB ParentFcb = NULL;
118
119 - NTSTATUS Status;
120 + NTSTATUS Status = STATUS_SUCCESS; /* ReactOS Change: GCC uninitialized variable */
121
122 PAGED_CODE();
123
124 @@ -2757,8 +2757,8 @@
125 OplockStatus = FsRtlCheckOplock( &Fcb->Oplock,
126 IrpContext->Irp,
127 IrpContext,
128 - CdOplockComplete,
129 - CdPrePostIrp );
130 + (PVOID)CdOplockComplete, /* ReactOS Change: GCC "assignment from incompatible pointer type" */
131 + (PVOID)CdPrePostIrp ); /* ReactOS Change: GCC "assignment from incompatible pointer type" */
132
133 if (OplockStatus == STATUS_PENDING) {
134
135 @@ -2789,8 +2789,8 @@
136 OplockStatus = FsRtlCheckOplock( &Fcb->Oplock,
137 IrpContext->Irp,
138 IrpContext,
139 - CdOplockComplete,
140 - CdPrePostIrp );
141 + (PVOID)CdOplockComplete,/* ReactOS Change: GCC "assignment from incompatible pointer type" */
142 + (PVOID)CdPrePostIrp );/* ReactOS Change: GCC "assignment from incompatible pointer type" */
143
144 if (OplockStatus == STATUS_PENDING) {
145
146 Index: drivers/filesystems/cdfs_new/devctrl.c
147 ===================================================================
148 --- drivers/filesystems/cdfs_new/devctrl.c (revision 34615)
149 +++ drivers/filesystems/cdfs_new/devctrl.c (working copy)
150 @@ -64,7 +64,7 @@
151 PIO_STACK_LOCATION IrpSp;
152 PIO_STACK_LOCATION NextIrpSp;
153
154 - PVOID TargetBuffer = NULL;
155 +// PVOID TargetBuffer = NULL; /* ReactOS Change: GCC unused variable */
156
157 PAGED_CODE();
158
159 Index: drivers/filesystems/cdfs_new/close.c
160 ===================================================================
161 --- drivers/filesystems/cdfs_new/close.c (revision 34615)
162 +++ drivers/filesystems/cdfs_new/close.c (working copy)
163 @@ -77,6 +77,7 @@
164 );
165
166 VOID
167 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
168 CdCloseWorker (
169 IN PDEVICE_OBJECT DeviceObject,
170 IN PVOID Context
171 @@ -136,9 +137,9 @@
172 //
173 // Continue processing until there are no more closes to process.
174 //
175 + /* ReactOS Change: "GCC suggest parentheses around assignment used as truth value" */
176 + while ((IrpContext = CdRemoveClose( Vcb ))) {
177
178 - while (IrpContext = CdRemoveClose( Vcb )) {
179 -
180 //
181 // If we don't have an IrpContext then use the one on the stack.
182 // Initialize it for this request.
183 @@ -165,7 +166,7 @@
184 // Free the IrpContextLite.
185 //
186
187 - CdFreeIrpContextLite( (PIRP_CONTEXT_LITE) IrpContext );
188 + CdFreeIrpContextLite( IrpContext ); /* ReactOS Change: GCC "error: invalid lvalue in unary '&'" */
189
190 //
191 // Remember we have the IrpContext from the stack.
192 @@ -662,6 +663,7 @@
193 }
194
195 VOID
196 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
197 CdCloseWorker (
198 IN PDEVICE_OBJECT DeviceObject,
199 IN PVOID Context
200 Index: drivers/filesystems/cdfs_new/dirsup.c
201 ===================================================================
202 --- drivers/filesystems/cdfs_new/dirsup.c (revision 34615)
203 +++ drivers/filesystems/cdfs_new/dirsup.c (working copy)
204 @@ -465,7 +465,7 @@
205 // Save a pointer to the time stamps.
206 //
207
208 - Dirent->CdTime = RawDirent->RecordTime;
209 + Dirent->CdTime = (PCHAR)RawDirent->RecordTime; /* ReactOS change: GCC "pointer targets in assignment differ in signedness" */
210
211 //
212 // Copy the dirent flags.
213 @@ -501,7 +501,7 @@
214 }
215
216 Dirent->FileNameLen = RawDirent->FileIdLen;
217 - Dirent->FileName = RawDirent->FileId;
218 + Dirent->FileName = (PCHAR)RawDirent->FileId; /* ReactOS change: GCC "pointer targets in assignment differ in signedness" */
219
220 //
221 // If there are any remaining bytes at the end of the dirent then
222 @@ -1457,7 +1457,7 @@
223 --*/
224
225 {
226 - XA_EXTENT_TYPE ExtentType;
227 + XA_EXTENT_TYPE ExtentType = 0; /* ReactOS Change: GCC Uninit var */
228 PCOMPOUND_DIRENT CurrentCompoundDirent;
229 PDIRENT CurrentDirent;
230
231 Index: drivers/filesystems/cdfs_new/read.c
232 ===================================================================
233 --- drivers/filesystems/cdfs_new/read.c (revision 34615)
234 +++ drivers/filesystems/cdfs_new/read.c (working copy)
235 @@ -79,7 +79,7 @@
236 --*/
237
238 {
239 - NTSTATUS Status;
240 + NTSTATUS Status = STATUS_SUCCESS; /* ReactOS Change: GCC Uninit var */
241 PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp );
242
243 TYPE_OF_OPEN TypeOfOpen;
244 @@ -225,8 +225,8 @@
245 Status = FsRtlCheckOplock( &Fcb->Oplock,
246 Irp,
247 IrpContext,
248 - CdOplockComplete,
249 - CdPrePostIrp );
250 + (PVOID)CdOplockComplete,/* ReactOS Change: GCC "assignment from incompatible pointer type" */
251 + (PVOID)CdPrePostIrp );/* ReactOS Change: GCC "assignment from incompatible pointer type" */
252
253 //
254 // If the result is not STATUS_SUCCESS then the Irp was completed
255 Index: drivers/filesystems/cdfs_new/volinfo.c
256 ===================================================================
257 --- drivers/filesystems/cdfs_new/volinfo.c (revision 34615)
258 +++ drivers/filesystems/cdfs_new/volinfo.c (working copy)
259 @@ -166,8 +166,11 @@
260
261 Status = CdQueryFsAttributeInfo( IrpContext, Fcb->Vcb, Irp->AssociatedIrp.SystemBuffer, &Length );
262 break;
263 +
264 + /* ReactOS Change: GCC "enumeration value not handled in switch" */
265 + default: break;
266 }
267 -
268 +
269 //
270 // Set the information field to the number of bytes actually filled in
271 //
272 Index: drivers/filesystems/cdfs_new/cdfs.rbuild
273 ===================================================================
274 --- drivers/filesystems/cdfs_new/cdfs.rbuild (revision 34615)
275 +++ drivers/filesystems/cdfs_new/cdfs.rbuild (working copy)
276 @@ -1,8 +1,8 @@
277 <?xml version="1.0"?>
278 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
279 -<module name="cdfs_new" type="kernelmodedriver" installbase="system32/drivers" installname="cdfs_new.sys">
280 +<module name="cdfs" type="kernelmodedriver" installbase="system32/drivers" installname="cdfs.sys">
281 <bootstrap installbase="$(CDOUTPUT)" />
282 - <include base="cdfs_new">.</include>
283 + <include base="cdfs">.</include>
284 <library>ntoskrnl</library>
285 <library>hal</library>
286 <file>allocsup.c</file>
287 @@ -32,6 +32,5 @@
288 <file>volinfo.c</file>
289 <file>workque.c</file>
290 <file>cdfs.rc</file>
291 - <compilerflag>-fms-extensions</compilerflag>
292 <pch>cdprocs.h</pch>
293 </module>
294 Index: drivers/filesystems/cdfs_new/cddata.c
295 ===================================================================
296 --- drivers/filesystems/cdfs_new/cddata.c (revision 34615)
297 +++ drivers/filesystems/cdfs_new/cddata.c (working copy)
298 @@ -417,7 +417,6 @@
299 return Status;
300 }
301
302 -
303 #ifdef CD_SANITY
304
305 VOID
306 @@ -481,7 +480,6 @@
307
308 #endif
309
310 -
311 LONG
312 CdExceptionFilter (
313 IN PIRP_CONTEXT IrpContext,
314 @@ -1006,6 +1004,7 @@
315
316 \f
317 BOOLEAN
318 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
319 CdFastIoCheckIfPossible (
320 IN PFILE_OBJECT FileObject,
321 IN PLARGE_INTEGER FileOffset,
322 Index: drivers/filesystems/cdfs_new/allocsup.c
323 ===================================================================
324 --- drivers/filesystems/cdfs_new/allocsup.c (revision 34615)
325 +++ drivers/filesystems/cdfs_new/allocsup.c (working copy)
326 @@ -128,7 +128,7 @@
327 {
328 BOOLEAN FirstPass = TRUE;
329 ULONG McbEntryOffset;
330 - PFCB ParentFcb;
331 + PFCB ParentFcb = NULL; /* ReactOS Change: GCC uninitialized variable bug */
332 BOOLEAN CleanupParent = FALSE;
333
334 BOOLEAN UnlockFcb = FALSE;
335 Index: drivers/filesystems/cdfs_new/verfysup.c
336 ===================================================================
337 --- drivers/filesystems/cdfs_new/verfysup.c (revision 34615)
338 +++ drivers/filesystems/cdfs_new/verfysup.c (working copy)
339 @@ -431,7 +431,7 @@
340 ULONG MediaChangeCount = 0;
341 BOOLEAN ForceVerify = FALSE;
342 BOOLEAN DevMarkedForVerify;
343 - KIRQL SavedIrql;
344 + //KIRQL SavedIrql; /* ReactOS Change: GCC Unused variable */
345
346 PAGED_CODE();
347
348 @@ -581,6 +581,9 @@
349
350 CdRaiseStatus( IrpContext, STATUS_FILE_INVALID );
351 break;
352 +
353 + /* ReactOS Change: GCC "enumeration value not handled in switch" */
354 + default: break;
355 }
356 }
357
358 @@ -613,7 +616,7 @@
359 --*/
360
361 {
362 - NTSTATUS Status = STATUS_SUCCESS;
363 + //NTSTATUS Status = STATUS_SUCCESS; /* ReactOS Change: GCC Unused variable */
364 PVCB Vcb = Fcb->Vcb;
365 PDEVICE_OBJECT RealDevice = Vcb->Vpb->RealDevice;
366 PIRP Irp;
367 Index: drivers/filesystems/cdfs_new/filobsup.c
368 ===================================================================
369 --- drivers/filesystems/cdfs_new/filobsup.c (revision 34615)
370 +++ drivers/filesystems/cdfs_new/filobsup.c (working copy)
371 @@ -105,7 +105,7 @@
372 FileObject->FsContext = Fcb;
373 FileObject->FsContext2 = Ccb;
374
375 - SetFlag( ((ULONG_PTR) FileObject->FsContext2), TypeOfOpen );
376 + SetFlag( (*(PULONG_PTR)&FileObject->FsContext2), TypeOfOpen ); /* ReactOS Change: GCC "invalid lvalue in assignment" */
377
378 //
379 // Set the Vpb field in the file object.
380 @@ -176,7 +176,7 @@
381 *Fcb = FileObject->FsContext;
382 *Ccb = FileObject->FsContext2;
383
384 - ClearFlag( (ULONG_PTR) *Ccb, TYPE_OF_OPEN_MASK );
385 + ClearFlag( (*(PULONG_PTR)Ccb), TYPE_OF_OPEN_MASK ); /* ReactOS Change: GCC "invalid lvalue in assignment" */
386 }
387
388 //
389 Index: drivers/filesystems/cdfs_new/pathsup.c
390 ===================================================================
391 --- drivers/filesystems/cdfs_new/pathsup.c (revision 34615)
392 +++ drivers/filesystems/cdfs_new/pathsup.c (working copy)
393 @@ -764,7 +764,7 @@
394
395 PathEntry->PathEntryLength = WordAlign( PathEntry->PathEntryLength );
396
397 - PathEntry->DirName = RawPathEntry->DirId;
398 + PathEntry->DirName = (PCHAR)RawPathEntry->DirId; /* ReactOS Change: GCC "assignment makes pointer from integer without a cast" */
399
400 return TRUE;
401 }
402 Index: drivers/filesystems/cdfs_new/cdprocs.h
403 ===================================================================
404 --- drivers/filesystems/cdfs_new/cdprocs.h (revision 34615)
405 +++ drivers/filesystems/cdfs_new/cdprocs.h (working copy)
406 @@ -902,33 +904,39 @@
407 }
408
409 BOOLEAN
410 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
411 CdNoopAcquire (
412 IN PVOID Fcb,
413 IN BOOLEAN Wait
414 );
415
416 VOID
417 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
418 CdNoopRelease (
419 IN PVOID Fcb
420 );
421
422 BOOLEAN
423 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
424 CdAcquireForCache (
425 IN PFCB Fcb,
426 IN BOOLEAN Wait
427 );
428
429 VOID
430 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
431 CdReleaseFromCache (
432 IN PFCB Fcb
433 );
434
435 VOID
436 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
437 CdAcquireForCreateSection (
438 IN PFILE_OBJECT FileObject
439 );
440
441 VOID
442 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
443 CdReleaseForCreateSection (
444 IN PFILE_OBJECT FileObject
445 );
446 @@ -1184,8 +1192,8 @@
447 // Verification support routines. Contained in verfysup.c
448 //
449
450 -
451 -INLINE
452 +/* ReactOS Change: "LD multiple definition of `_CdOperationIsDasdOpen'" */
453 +static inline
454 BOOLEAN
455 CdOperationIsDasdOpen(
456 IN PIRP_CONTEXT IrpContext
457 @@ -1272,12 +1280,14 @@
458 );
459
460 VOID
461 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
462 CdPrePostIrp (
463 IN PIRP_CONTEXT IrpContext,
464 IN PIRP Irp
465 );
466
467 VOID
468 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
469 CdOplockComplete (
470 IN PIRP_CONTEXT IrpContext,
471 IN PIRP Irp
472 @@ -1293,7 +1303,9 @@
473 // otherwise
474 //
475
476 -//#ifndef BooleanFlagOn
477 +/* ReactOS Change: GCC doesn't understand the comment style */
478 +/*
479 + //#ifndef BooleanFlagOn
480 //#define BooleanFlagOn(F,SF) ( \
481 // (BOOLEAN)(((F) & (SF)) != 0) \
482 //)
483 @@ -1310,6 +1322,7 @@
484 // (Flags) &= ~(SingleFlag); \
485 //}
486 //#endif
487 +*/
488
489 //
490 // CAST
491 @@ -1598,6 +1611,7 @@
492 //
493
494 BOOLEAN
495 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
496 CdFastQueryBasicInfo (
497 IN PFILE_OBJECT FileObject,
498 IN BOOLEAN Wait,
499 @@ -1607,6 +1621,7 @@
500 );
501
502 BOOLEAN
503 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
504 CdFastQueryStdInfo (
505 IN PFILE_OBJECT FileObject,
506 IN BOOLEAN Wait,
507 @@ -1616,6 +1631,7 @@
508 );
509
510 BOOLEAN
511 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
512 CdFastLock (
513 IN PFILE_OBJECT FileObject,
514 IN PLARGE_INTEGER FileOffset,
515 @@ -1629,6 +1645,7 @@
516 );
517
518 BOOLEAN
519 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
520 CdFastUnlockSingle (
521 IN PFILE_OBJECT FileObject,
522 IN PLARGE_INTEGER FileOffset,
523 @@ -1640,6 +1657,7 @@
524 );
525
526 BOOLEAN
527 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
528 CdFastUnlockAll (
529 IN PFILE_OBJECT FileObject,
530 PEPROCESS ProcessId,
531 @@ -1648,6 +1666,7 @@
532 );
533
534 BOOLEAN
535 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
536 CdFastUnlockAllByKey (
537 IN PFILE_OBJECT FileObject,
538 PVOID ProcessId,
539 @@ -1657,6 +1676,7 @@
540 );
541
542 BOOLEAN
543 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
544 CdFastIoCheckIfPossible (
545 IN PFILE_OBJECT FileObject,
546 IN PLARGE_INTEGER FileOffset,
547 @@ -1669,6 +1689,7 @@
548 );
549
550 BOOLEAN
551 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
552 CdFastQueryNetworkInfo (
553 IN PFILE_OBJECT FileObject,
554 IN BOOLEAN Wait,
555 @@ -1862,17 +1883,26 @@
556 //
557 // #define try_return(S) { S; goto try_exit; }
558 //
559 +/* ReactOS Change: Remove SEH */
560 +#define try
561 +#define leave goto exitLabel;
562 +#define finally if (0) goto exitLabel; exitLabel:
563 +#define except(x) while (0)
564 +#define GetExceptionCode() 0
565 +#define AbnormalTermination() 0
566
567 -#define try_return(S) { S; goto try_exit; }
568 -#define try_leave(S) { S; leave; }
569 +#define try_return(S) { goto try_exit; }
570 +#define try_leave(S) { leave; }
571
572 +
573 //
574 // Encapsulate safe pool freeing
575 //
576 +/* ReactOS Change: GCC "passing argument 1 of CdFreePool from incompatible pointer type" */
577 +#define CdFreePool(x) _CdFreePool((PVOID*)(x))
578
579 -INLINE
580 -VOID
581 -CdFreePool(
582 +/* ReactOS Change: "LD multiple definition of `_CdOperationIsDasdOpen'" */
583 +static inline void _CdFreePool(
584 IN PVOID *Pool
585 )
586 {
587 Index: drivers/filesystems/cdfs_new/resrcsup.c
588 ===================================================================
589 --- drivers/filesystems/cdfs_new/resrcsup.c (revision 34615)
590 +++ drivers/filesystems/cdfs_new/resrcsup.c (working copy)
591 @@ -123,6 +123,7 @@
592
593 \f
594 BOOLEAN
595 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
596 CdAcquireForCache (
597 IN PFCB Fcb,
598 IN BOOLEAN Wait
599 @@ -159,6 +160,7 @@
600
601 \f
602 VOID
603 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
604 CdReleaseFromCache (
605 IN PFCB Fcb
606 )
607 @@ -193,6 +195,7 @@
608
609 \f
610 BOOLEAN
611 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
612 CdNoopAcquire (
613 IN PVOID Fcb,
614 IN BOOLEAN Wait
615 @@ -224,6 +227,7 @@
616
617 \f
618 VOID
619 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
620 CdNoopRelease (
621 IN PVOID Fcb
622 )
623 @@ -251,6 +255,7 @@
624
625 \f
626 VOID
627 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
628 CdAcquireForCreateSection (
629 IN PFILE_OBJECT FileObject
630 )
631 @@ -298,6 +303,7 @@
632
633 \f
634 VOID
635 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
636 CdReleaseForCreateSection (
637 IN PFILE_OBJECT FileObject
638 )
639 Index: drivers/filesystems/cdfs_new/namesup.c
640 ===================================================================
641 --- drivers/filesystems/cdfs_new/namesup.c (revision 34615)
642 +++ drivers/filesystems/cdfs_new/namesup.c (working copy)
643 @@ -206,7 +206,7 @@
644
645 {
646 NTSTATUS Status;
647 - PVOID NewBuffer;
648 + //PVOID NewBuffer; /* ReactOS Change: GCC Uninitialized variable */
649
650 PAGED_CODE();
651
652 Index: drivers/filesystems/cdfs_new/cdinit.c
653 ===================================================================
654 --- drivers/filesystems/cdfs_new/cdinit.c (revision 34615)
655 +++ drivers/filesystems/cdfs_new/cdinit.c (working copy)
656 @@ -22,12 +22,14 @@
657 #define BugCheckFileId (CDFS_BUG_CHECK_CDINIT)
658
659 NTSTATUS
660 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
661 DriverEntry(
662 IN PDRIVER_OBJECT DriverObject,
663 IN PUNICODE_STRING RegistryPath
664 );
665
666 VOID
667 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
668 CdUnload(
669 IN PDRIVER_OBJECT DriverObject
670 );
671 @@ -39,6 +41,7 @@
672 );
673
674 NTSTATUS
675 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
676 CdShutdown (
677 IN PDEVICE_OBJECT DeviceObject,
678 IN PIRP Irp
679 @@ -57,6 +60,7 @@
680 //
681
682 NTSTATUS
683 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
684 DriverEntry(
685 IN PDRIVER_OBJECT DriverObject,
686 IN PUNICODE_STRING RegistryPath
687 @@ -169,6 +173,7 @@
688 }
689
690 NTSTATUS
691 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
692 CdShutdown (
693 IN PDEVICE_OBJECT DeviceObject,
694 IN PIRP Irp
695 @@ -200,6 +205,7 @@
696
697
698 VOID
699 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
700 CdUnload(
701 IN PDRIVER_OBJECT DriverObject
702 )
703 @@ -310,10 +316,10 @@
704 // Initialize the cache manager callback routines
705 //
706
707 - CdData.CacheManagerCallbacks.AcquireForLazyWrite = &CdAcquireForCache;
708 - CdData.CacheManagerCallbacks.ReleaseFromLazyWrite = &CdReleaseFromCache;
709 - CdData.CacheManagerCallbacks.AcquireForReadAhead = &CdAcquireForCache;
710 - CdData.CacheManagerCallbacks.ReleaseFromReadAhead = &CdReleaseFromCache;
711 + CdData.CacheManagerCallbacks.AcquireForLazyWrite = (PVOID)&CdAcquireForCache;/* ReactOS Change: GCC "assignment from incompatible pointer type" */
712 + CdData.CacheManagerCallbacks.ReleaseFromLazyWrite = (PVOID)&CdReleaseFromCache;/* ReactOS Change: GCC "assignment from incompatible pointer type" */
713 + CdData.CacheManagerCallbacks.AcquireForReadAhead = (PVOID)&CdAcquireForCache;/* ReactOS Change: GCC "assignment from incompatible pointer type" */
714 + CdData.CacheManagerCallbacks.ReleaseFromReadAhead = (PVOID)&CdReleaseFromCache;/* ReactOS Change: GCC "assignment from incompatible pointer type" */
715
716 CdData.CacheManagerVolumeCallbacks.AcquireForLazyWrite = &CdNoopAcquire;
717 CdData.CacheManagerVolumeCallbacks.ReleaseFromLazyWrite = &CdNoopRelease;
718 Index: drivers/filesystems/cdfs_new/cdstruc.h
719 ===================================================================
720 --- drivers/filesystems/cdfs_new/cdstruc.h (revision 34615)
721 +++ drivers/filesystems/cdfs_new/cdstruc.h (working copy)
722 @@ -504,8 +504,8 @@
723 //
724
725 ULONG VcbCleanup;
726 - ULONG VcbReference;
727 - ULONG VcbUserReference;
728 + LONG VcbReference; /* ReactOS Change: GCC 'pointer targets in passing argument 1 of 'InterlockedXxx' differ in signedness */
729 + LONG VcbUserReference; /* ReactOS Change: GCC 'pointer targets in passing argument 1 of 'InterlockedXxx' differ in signedness */
730
731 //
732 // Fcb for the Volume Dasd file, root directory and the Path Table.
733 @@ -655,7 +655,7 @@
734 // executed later.
735 //
736
737 - ULONG PostedRequestCount;
738 + LONG PostedRequestCount; /* ReactOS Change: GCC "pointer targets in passing argument 1 of 'InterlockedDecrement' differ in signedness" */
739
740 //
741 // The following field indicates the number of IRP's waiting
742 @@ -878,7 +878,7 @@
743 //
744
745 ULONG FcbCleanup;
746 - ULONG FcbReference;
747 + LONG FcbReference; /* ReactOS Change: GCC 'pointer targets in passing argument 1 of 'InterlockedXxx' differ in signedness */
748 ULONG FcbUserReference;
749
750 //
751 Index: drivers/filesystems/cdfs_new/lockctrl.c
752 ===================================================================
753 --- drivers/filesystems/cdfs_new/lockctrl.c (revision 34615)
754 +++ drivers/filesystems/cdfs_new/lockctrl.c (working copy)
755 @@ -89,7 +89,7 @@
756 Status = FsRtlCheckOplock( &Fcb->Oplock,
757 Irp,
758 IrpContext,
759 - CdOplockComplete,
760 + (PVOID)CdOplockComplete,/* ReactOS Change: GCC "assignment from incompatible pointer type" */
761 NULL );
762
763 //
764 @@ -138,6 +138,7 @@
765
766 \f
767 BOOLEAN
768 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
769 CdFastLock (
770 IN PFILE_OBJECT FileObject,
771 IN PLARGE_INTEGER FileOffset,
772 @@ -246,8 +247,8 @@
773 //
774 // Now call the FsRtl routine to perform the lock request.
775 //
776 -
777 - if (Results = FsRtlFastLock( Fcb->FileLock,
778 + /* ReactOS Change: GCC "suggest parentheses around assignment used as truth value" */
779 + if ((Results = FsRtlFastLock( Fcb->FileLock,
780 FileObject,
781 FileOffset,
782 Length,
783 @@ -257,7 +258,7 @@
784 ExclusiveLock,
785 IoStatus,
786 NULL,
787 - FALSE )) {
788 + FALSE ))) {
789
790 //
791 // Set the flag indicating if Fast I/O is questionable. We
792 @@ -284,6 +285,7 @@
793
794 \f
795 BOOLEAN
796 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
797 CdFastUnlockSingle (
798 IN PFILE_OBJECT FileObject,
799 IN PLARGE_INTEGER FileOffset,
800 @@ -424,6 +426,7 @@
801
802 \f
803 BOOLEAN
804 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
805 CdFastUnlockAll (
806 IN PFILE_OBJECT FileObject,
807 PEPROCESS ProcessId,
808 @@ -546,6 +549,7 @@
809
810 \f
811 BOOLEAN
812 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
813 CdFastUnlockAllByKey (
814 IN PFILE_OBJECT FileObject,
815 PVOID ProcessId,
816 Index: drivers/filesystems/cdfs_new/cleanup.c
817 ===================================================================
818 --- drivers/filesystems/cdfs_new/cleanup.c (revision 34615)
819 +++ drivers/filesystems/cdfs_new/cleanup.c (working copy)
820 @@ -159,7 +159,7 @@
821 // Use a try-finally to facilitate cleanup.
822 //
823
824 - try {
825 + //try { /* ReactOS Change: Manual removal of SEH since macros to hack around it don't allow multiple SEH usage within one function */
826
827 //
828 // Case on the type of open that we are trying to cleanup.
829 @@ -279,7 +279,7 @@
830
831 IoRemoveShareAccess( FileObject, &Fcb->ShareAccess );
832
833 - } finally {
834 + //} finally { /* ReactOS Change: Manual removal of SEH since macros to hack around it don't allow multiple SEH usage within one function */
835
836 CdReleaseFcb( IrpContext, Fcb );
837
838 @@ -287,7 +287,7 @@
839
840 FsRtlNotifyVolumeEvent( FileObject, FSRTL_VOLUME_UNLOCK );
841 }
842 - }
843 + //} /* ReactOS Change: Manual removal of SEH since macros to hack around it don't allow multiple SEH usage within one function */
844
845 //
846 // If appropriate, try to spark teardown by purging the volume. Should
847 Index: drivers/filesystems/cdfs_new/strucsup.c
848 ===================================================================
849 --- drivers/filesystems/cdfs_new/strucsup.c (revision 34615)
850 +++ drivers/filesystems/cdfs_new/strucsup.c (working copy)
851 @@ -438,7 +438,7 @@
852 --*/
853
854 {
855 - ULONG Shift;
856 + //ULONG Shift; /* ReactOS Change: GCC Unused variable */
857 ULONG StartingBlock;
858 ULONG ByteCount;
859
860 Index: drivers/filesystems/cdfs_new/fileinfo.c
861 ===================================================================
862 --- drivers/filesystems/cdfs_new/fileinfo.c (revision 34615)
863 +++ drivers/filesystems/cdfs_new/fileinfo.c (working copy)
864 @@ -460,6 +460,7 @@
865
866 \f
867 BOOLEAN
868 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
869 CdFastQueryBasicInfo (
870 IN PFILE_OBJECT FileObject,
871 IN BOOLEAN Wait,
872 @@ -577,6 +578,7 @@
873
874 \f
875 BOOLEAN
876 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
877 CdFastQueryStdInfo (
878 IN PFILE_OBJECT FileObject,
879 IN BOOLEAN Wait,
880 @@ -704,6 +706,7 @@
881
882 \f
883 BOOLEAN
884 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
885 CdFastQueryNetworkInfo (
886 IN PFILE_OBJECT FileObject,
887 IN BOOLEAN Wait,
888 Index: drivers/filesystems/cdfs_new/fsctrl.c
889 ===================================================================
890 --- drivers/filesystems/cdfs_new/fsctrl.c (revision 34615)
891 +++ drivers/filesystems/cdfs_new/fsctrl.c (working copy)
892 @@ -82,7 +82,8 @@
893 IN PIRP_CONTEXT IrpContext,
894 IN PIRP Irp
895 );
896 -
897 +
898 +NTSTATUS /* ReactOS Change: Function did not have a type??? */
899 CdIsVolumeDirty (
900 IN PIRP_CONTEXT IrpContext,
901 IN PIRP Irp
902 @@ -918,7 +919,7 @@
903
904 if (CdIsRemount( IrpContext, Vcb, &OldVcb )) {
905
906 - KIRQL SavedIrql;
907 + //KIRQL SavedIrql; /* ReactOS Change: GCC Unused variable */
908
909 ASSERT( NULL != OldVcb->SwapVpb );
910
911 @@ -1374,7 +1375,7 @@
912 // Compute the length of the volume name
913 //
914
915 - AnsiLabel.Buffer = CdRvdVolId( RawIsoVd, Vcb->VcbState );
916 + AnsiLabel.Buffer = (PCHAR)CdRvdVolId( RawIsoVd, Vcb->VcbState ); /* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
917 AnsiLabel.MaximumLength = AnsiLabel.Length = VOLUME_ID_LENGTH;
918
919 UnicodeLabel.MaximumLength = VOLUME_ID_LENGTH * sizeof( WCHAR );
920 @@ -1401,7 +1402,7 @@
921 } else {
922
923 CdConvertBigToLittleEndian( IrpContext,
924 - CdRvdVolId( RawIsoVd, Vcb->VcbState ),
925 + (PCHAR)CdRvdVolId( RawIsoVd, Vcb->VcbState ),/* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
926 VOLUME_ID_LENGTH,
927 (PCHAR) VolumeLabel );
928
929 @@ -2005,7 +2006,7 @@
930 //
931 // Local support routine
932 //
933 -
934 +NTSTATUS /* ReactOS Change: Function did not have a type??? */
935 CdIsVolumeDirty (
936 IN PIRP_CONTEXT IrpContext,
937 IN PIRP Irp
938 @@ -2294,9 +2295,9 @@
939
940 Status = ObReferenceObjectByHandle( Handle,
941 0,
942 - *IoFileObjectType,
943 + IoFileObjectType, /* ReactOS Change: GCC/LD Incompatibility with exported kernel data */
944 KernelMode,
945 - &FileToMarkBad,
946 + (PVOID*)&FileToMarkBad, /* ReactOS Change: GCC "passing argument 5 of 'ObReferenceObjectByHandle' from incompatible pointer type" */
947 NULL );
948
949 if (!NT_SUCCESS(Status)) {
950 @@ -2642,8 +2643,8 @@
951 // The track address is BigEndian, we need to flip the bytes.
952 //
953
954 - Source = (PUCHAR) &CdromToc->TrackData[0].Address[3];
955 - Dest = (PUCHAR) &BaseSector;
956 + Source = (PCHAR) &CdromToc->TrackData[0].Address[3];/* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
957 + Dest = (PCHAR) &BaseSector; /* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
958
959 do {
960
961 @@ -3118,7 +3119,7 @@
962 if (NT_SUCCESS( RtlOemToUnicodeN( &Vcb->Vpb->VolumeLabel[0],
963 MAXIMUM_VOLUME_LABEL_LENGTH,
964 &Length,
965 - CdRvdVolId( RawIsoVd, Vcb->VcbState ),
966 + (PCHAR)CdRvdVolId( RawIsoVd, Vcb->VcbState ),/* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
967 VOLUME_ID_LENGTH ))) {
968
969 Vcb->Vpb->VolumeLabelLength = (USHORT) Length;
970 @@ -3131,7 +3132,7 @@
971 } else {
972
973 CdConvertBigToLittleEndian( IrpContext,
974 - CdRvdVolId( RawIsoVd, Vcb->VcbState ),
975 + (PCHAR)CdRvdVolId( RawIsoVd, Vcb->VcbState ),/* ReactOS Change: GCC "pointer targets in assignment differ in signedness" */
976 VOLUME_ID_LENGTH,
977 (PCHAR) Vcb->Vpb->VolumeLabel );
978
979 Index: drivers/filesystems/cdfs_new/workque.c
980 ===================================================================
981 --- drivers/filesystems/cdfs_new/workque.c (revision 34615)
982 +++ drivers/filesystems/cdfs_new/workque.c (working copy)
983 @@ -97,6 +97,7 @@
984
985 \f
986 VOID
987 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
988 CdPrePostIrp (
989 IN PIRP_CONTEXT IrpContext,
990 IN PIRP Irp
991 @@ -209,6 +210,7 @@
992
993 \f
994 VOID
995 +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
996 CdOplockComplete (
997 IN PIRP_CONTEXT IrpContext,
998 IN PIRP Irp
999 @@ -386,7 +388,7 @@
1000 //
1001
1002 ExInitializeWorkItem( &IrpContext->WorkQueueItem,
1003 - CdFspDispatch,
1004 + (PVOID)CdFspDispatch,/* ReactOS Change: GCC "assignment from incompatible pointer type" */
1005 IrpContext );
1006
1007 ExQueueWorkItem( &IrpContext->WorkQueueItem, CriticalWorkQueue );