mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CLASSPNP][CDROM_NEW][DISK_NEW] Fix clang build
CORE-17129
This commit is contained in:
parent
fe1b98fc36
commit
15a7b9dd2f
10 changed files with 59 additions and 57 deletions
|
@ -807,7 +807,7 @@ VOID
|
|||
#define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit))
|
||||
#define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0)
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
BOOLEAN
|
||||
ValidChar(UCHAR Ch)
|
||||
{
|
||||
|
@ -821,7 +821,7 @@ ValidChar(UCHAR Ch)
|
|||
}
|
||||
|
||||
// could be #define, but this allows typechecking
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
BOOLEAN
|
||||
PORT_ALLOCATED_SENSE(
|
||||
_In_ PCDROM_DEVICE_EXTENSION DeviceExtension,
|
||||
|
@ -834,7 +834,7 @@ PORT_ALLOCATED_SENSE(
|
|||
);
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
VOID
|
||||
FREE_PORT_ALLOCATED_SENSE_BUFFER(
|
||||
_In_ PCDROM_DEVICE_EXTENSION DeviceExtension,
|
||||
|
@ -1497,19 +1497,19 @@ DvdSendKey(
|
|||
//
|
||||
// neat little hacks to count number of bits set efficiently
|
||||
//
|
||||
__inline ULONG CountOfSetBitsUChar(UCHAR _X)
|
||||
FORCEINLINE ULONG CountOfSetBitsUChar(UCHAR _X)
|
||||
{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
|
||||
__inline ULONG CountOfSetBitsULong(ULONG _X)
|
||||
FORCEINLINE ULONG CountOfSetBitsULong(ULONG _X)
|
||||
{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
|
||||
__inline ULONG CountOfSetBitsULong32(ULONG32 _X)
|
||||
FORCEINLINE ULONG CountOfSetBitsULong32(ULONG32 _X)
|
||||
{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
|
||||
__inline ULONG CountOfSetBitsULong64(ULONG64 _X)
|
||||
FORCEINLINE ULONG CountOfSetBitsULong64(ULONG64 _X)
|
||||
{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
|
||||
__inline ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X)
|
||||
FORCEINLINE ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X)
|
||||
{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
|
||||
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
BOOLEAN
|
||||
IsVolumeMounted(
|
||||
_In_ PDEVICE_OBJECT DeviceObject
|
||||
|
@ -1523,7 +1523,7 @@ IsVolumeMounted(
|
|||
}
|
||||
|
||||
|
||||
__inline _Ret_range_(0,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS)
|
||||
FORCEINLINE _Ret_range_(0,MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS)
|
||||
LONGLONG
|
||||
ConvertSectorsPerSecondTo100nsUnitsFor64kWrite(
|
||||
_In_range_(1,0xFFFFFFFF) ULONG SectorsPerSecond // zero would cause divide-by-zero
|
||||
|
@ -1549,7 +1549,7 @@ ConvertSectorsPerSecondTo100nsUnitsFor64kWrite(
|
|||
return 320000000 / SectorsPerSecond;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
UCHAR
|
||||
RequestGetCurrentStackLocationFlags(
|
||||
_In_ WDFREQUEST Request
|
||||
|
@ -1564,7 +1564,7 @@ RequestGetCurrentStackLocationFlags(
|
|||
return currentStack->Flags;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
ULONG
|
||||
TimeOutValueGetCapValue(
|
||||
_In_ ULONG TimeOutValue,
|
||||
|
|
|
@ -6675,7 +6675,7 @@ Return Value:
|
|||
return status;
|
||||
} // end RequestHandleReserveRelease()
|
||||
|
||||
__inline
|
||||
static // __REACTOS__
|
||||
BOOLEAN
|
||||
ValidPersistentReserveScope(
|
||||
UCHAR Scope)
|
||||
|
@ -6692,7 +6692,7 @@ ValidPersistentReserveScope(
|
|||
}
|
||||
}
|
||||
|
||||
__inline
|
||||
static // __REACTOS__
|
||||
BOOLEAN
|
||||
ValidPersistentReserveType(
|
||||
UCHAR Type)
|
||||
|
|
|
@ -87,7 +87,7 @@ ScratchBuffer_PerformNextReadWrite(
|
|||
#define ScratchBuffer_BeginUse(context) ScratchBuffer_BeginUseX((context), NULL, (ULONG)-1)
|
||||
#endif
|
||||
|
||||
__inline VOID ScratchBuffer_BeginUseX(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_opt_ LPCSTR File, ULONG Line)
|
||||
FORCEINLINE VOID ScratchBuffer_BeginUseX(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_opt_ LPCSTR File, ULONG Line)
|
||||
{
|
||||
// NOTE: these are not "real" locks. They are simply to help
|
||||
// avoid multiple uses of the scratch buffer. Thus, it
|
||||
|
@ -101,7 +101,7 @@ __inline VOID ScratchBuffer_BeginUseX(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExte
|
|||
RequestClearSendTime(DeviceExtension->ScratchContext.ScratchRequest);
|
||||
return;
|
||||
}
|
||||
__inline VOID ScratchBuffer_EndUse(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension)
|
||||
FORCEINLINE VOID ScratchBuffer_EndUse(_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
// NOTE: these are not "real" locks. They are simply to help
|
||||
// avoid multiple uses of the scratch buffer. Thus, it
|
||||
|
@ -162,7 +162,7 @@ ScratchBuffer_ExecuteCdbEx(
|
|||
);
|
||||
|
||||
_IRQL_requires_max_(APC_LEVEL)
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
NTSTATUS
|
||||
ScratchBuffer_ExecuteCdb(
|
||||
_Inout_ PCDROM_DEVICE_EXTENSION DeviceExtension,
|
||||
|
|
|
@ -56,7 +56,7 @@ const GUID StoragePredictFailureEventGuid = WMI_STORAGE_PREDICT_FAILURE_EVENT_GU
|
|||
// would be to serialize the polling and power down irps so that
|
||||
// only one of them is sent to the device at a time.
|
||||
//
|
||||
__inline
|
||||
static
|
||||
BOOLEAN
|
||||
ClasspCanSendPollingIrp(
|
||||
_In_ PFUNCTIONAL_DEVICE_EXTENSION fdoExtension
|
||||
|
|
|
@ -1208,16 +1208,16 @@ typedef struct _IO_RETRIED_LOG_MESSAGE_CONTEXT {
|
|||
/*
|
||||
* Simple singly-linked-list queuing macros, with no synchronization.
|
||||
*/
|
||||
__inline VOID SimpleInitSlistHdr(SINGLE_LIST_ENTRY *SListHdr)
|
||||
FORCEINLINE VOID SimpleInitSlistHdr(SINGLE_LIST_ENTRY *SListHdr)
|
||||
{
|
||||
SListHdr->Next = NULL;
|
||||
}
|
||||
__inline VOID SimplePushSlist(SINGLE_LIST_ENTRY *SListHdr, SINGLE_LIST_ENTRY *SListEntry)
|
||||
FORCEINLINE VOID SimplePushSlist(SINGLE_LIST_ENTRY *SListHdr, SINGLE_LIST_ENTRY *SListEntry)
|
||||
{
|
||||
SListEntry->Next = SListHdr->Next;
|
||||
SListHdr->Next = SListEntry;
|
||||
}
|
||||
__inline SINGLE_LIST_ENTRY *SimplePopSlist(SINGLE_LIST_ENTRY *SListHdr)
|
||||
FORCEINLINE SINGLE_LIST_ENTRY *SimplePopSlist(SINGLE_LIST_ENTRY *SListHdr)
|
||||
{
|
||||
SINGLE_LIST_ENTRY *sListEntry = SListHdr->Next;
|
||||
if (sListEntry){
|
||||
|
@ -1226,12 +1226,12 @@ __inline SINGLE_LIST_ENTRY *SimplePopSlist(SINGLE_LIST_ENTRY *SListHdr)
|
|||
}
|
||||
return sListEntry;
|
||||
}
|
||||
__inline BOOLEAN SimpleIsSlistEmpty(SINGLE_LIST_ENTRY *SListHdr)
|
||||
FORCEINLINE BOOLEAN SimpleIsSlistEmpty(SINGLE_LIST_ENTRY *SListHdr)
|
||||
{
|
||||
return (SListHdr->Next == NULL);
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsIdleRequestSupported(
|
||||
PCLASS_PRIVATE_FDO_DATA FdoData,
|
||||
|
@ -1246,7 +1246,7 @@ ClasspIsIdleRequestSupported(
|
|||
#endif
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
VOID
|
||||
ClasspMarkIrpAsIdle(
|
||||
PIRP Irp,
|
||||
|
@ -1263,7 +1263,7 @@ ClasspMarkIrpAsIdle(
|
|||
#endif
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsIdleRequest(
|
||||
PIRP Irp
|
||||
|
@ -1275,7 +1275,7 @@ ClasspIsIdleRequest(
|
|||
return ((BOOLEAN)Irp->Tail.Overlay.DriverContext[1]);
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
LARGE_INTEGER
|
||||
ClasspGetCurrentTime(
|
||||
VOID
|
||||
|
@ -1292,7 +1292,7 @@ ClasspGetCurrentTime(
|
|||
return currentTime;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
ULONGLONG
|
||||
ClasspTimeDiffToMs(
|
||||
ULONGLONG TimeDiff
|
||||
|
@ -1303,7 +1303,7 @@ ClasspTimeDiffToMs(
|
|||
return TimeDiff;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspSupportsUnmap(
|
||||
_In_ PCLASS_FUNCTION_SUPPORT_INFO SupportInfo
|
||||
|
@ -1312,7 +1312,7 @@ ClasspSupportsUnmap(
|
|||
return SupportInfo->LBProvisioningData.LBPU;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsThinProvisioned(
|
||||
_In_ PCLASS_FUNCTION_SUPPORT_INFO SupportInfo
|
||||
|
@ -1330,7 +1330,7 @@ ClasspIsThinProvisioned(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsObsoletePortDriver(
|
||||
_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
|
@ -2018,7 +2018,7 @@ ClasspBinaryToAscii(
|
|||
_Inout_ PULONG UpdateLength
|
||||
);
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsTokenOperationComplete(
|
||||
_In_ ULONG CurrentStatus
|
||||
|
@ -2039,7 +2039,7 @@ ClasspIsTokenOperationComplete(
|
|||
return operationCompleted;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsTokenOperation(
|
||||
_In_ PCDB Cdb
|
||||
|
@ -2061,7 +2061,7 @@ ClasspIsTokenOperation(
|
|||
return tokenOperation;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsReceiveTokenInformation(
|
||||
_In_ PCDB Cdb
|
||||
|
@ -2082,7 +2082,7 @@ ClasspIsReceiveTokenInformation(
|
|||
return receiveTokenInformation;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspIsOffloadDataTransferCommand(
|
||||
_In_ PCDB Cdb
|
||||
|
@ -2441,7 +2441,7 @@ ClasspConvertToScsiRequestBlock(
|
|||
_In_ PSTORAGE_REQUEST_BLOCK SrbEx
|
||||
);
|
||||
|
||||
__inline PCDB
|
||||
FORCEINLINE PCDB
|
||||
ClasspTransferPacketGetCdb(
|
||||
_In_ PTRANSFER_PACKET Pkt
|
||||
)
|
||||
|
@ -2455,7 +2455,7 @@ ClasspTransferPacketGetCdb(
|
|||
//
|
||||
// For unknown operation codes this function will return false and will set TimesAlreadyRetried with zero
|
||||
//
|
||||
__inline BOOLEAN
|
||||
FORCEINLINE BOOLEAN
|
||||
ClasspTransferPacketGetNumberOfRetriesDone(
|
||||
_In_ PTRANSFER_PACKET Pkt,
|
||||
_In_ PCDB Cdb,
|
||||
|
@ -2509,7 +2509,7 @@ ClasspTransferPacketGetNumberOfRetriesDone(
|
|||
}
|
||||
|
||||
|
||||
__inline PVOID
|
||||
FORCEINLINE PVOID
|
||||
ClasspTransferPacketGetSenseInfoBuffer(
|
||||
_In_ PTRANSFER_PACKET Pkt
|
||||
)
|
||||
|
@ -2517,7 +2517,7 @@ ClasspTransferPacketGetSenseInfoBuffer(
|
|||
return SrbGetSenseInfoBuffer(Pkt->Srb);
|
||||
}
|
||||
|
||||
__inline UCHAR
|
||||
FORCEINLINE UCHAR
|
||||
ClasspTransferPacketGetSenseInfoBufferLength(
|
||||
_In_ PTRANSFER_PACKET Pkt
|
||||
)
|
||||
|
@ -2526,7 +2526,7 @@ ClasspTransferPacketGetSenseInfoBufferLength(
|
|||
}
|
||||
|
||||
|
||||
__inline VOID
|
||||
FORCEINLINE VOID
|
||||
ClasspSrbSetOriginalIrp(
|
||||
_In_ PSTORAGE_REQUEST_BLOCK_HEADER Srb,
|
||||
_In_ PIRP Irp
|
||||
|
@ -2542,7 +2542,7 @@ ClasspSrbSetOriginalIrp(
|
|||
}
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
PORT_ALLOCATED_SENSE_EX(
|
||||
_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
|
@ -2555,7 +2555,7 @@ PORT_ALLOCATED_SENSE_EX(
|
|||
);
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
VOID
|
||||
FREE_PORT_ALLOCATED_SENSE_BUFFER_EX(
|
||||
_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
|
@ -2580,7 +2580,7 @@ ClasspFailurePredictionPeriodMissed(
|
|||
_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
ULONG
|
||||
ClasspGetMaxUsableBufferLengthFromOffset(
|
||||
_In_ PVOID BaseAddress,
|
||||
|
@ -2633,7 +2633,7 @@ ClasspIsThinProvisioningError (
|
|||
_In_ PSCSI_REQUEST_BLOCK _Srb
|
||||
);
|
||||
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspLowerLayerNotSupport (
|
||||
_In_ NTSTATUS Status
|
||||
|
@ -2646,7 +2646,7 @@ ClasspLowerLayerNotSupport (
|
|||
}
|
||||
|
||||
#if defined(__REACTOS__) && (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
__inline
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
ClasspSrbTimeOutStatus (
|
||||
_In_ PSTORAGE_REQUEST_BLOCK_HEADER Srb
|
||||
|
|
|
@ -422,7 +422,7 @@ Revision History:
|
|||
A pointer to the value to be incremented.
|
||||
|
||||
--*/
|
||||
__inline VOID DbgSafeInc(PULONG pValue)
|
||||
static VOID DbgSafeInc(PULONG pValue)
|
||||
{
|
||||
ULONG incrementResult;
|
||||
if(NT_SUCCESS(RtlULongAdd(*pValue, 1, &incrementResult))) {
|
||||
|
|
|
@ -1883,7 +1883,7 @@ Exit:
|
|||
return status;
|
||||
}
|
||||
|
||||
__inline
|
||||
static
|
||||
NTSTATUS
|
||||
IncursSeekPenalty (
|
||||
_In_ USHORT MediumRotationRate,
|
||||
|
@ -6147,7 +6147,7 @@ __ClasspQueueLogIOEventWithContextWorker_Exit:
|
|||
}
|
||||
}
|
||||
|
||||
__inline
|
||||
static
|
||||
BOOLEAN
|
||||
ValidPersistentReserveScope(
|
||||
UCHAR Scope)
|
||||
|
@ -6166,7 +6166,7 @@ ValidPersistentReserveScope(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
__inline
|
||||
static
|
||||
BOOLEAN
|
||||
ValidPersistentReserveType(
|
||||
UCHAR Type)
|
||||
|
@ -8324,6 +8324,7 @@ retry:
|
|||
|
||||
#endif // #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
|
||||
|
||||
#ifndef __REACTOS__ // the functions is not used
|
||||
__inline
|
||||
BOOLEAN
|
||||
ClassDeviceHwFirmwareIsPortDriverSupported(
|
||||
|
@ -8359,6 +8360,7 @@ Return Value:
|
|||
|
||||
return isSupported;
|
||||
}
|
||||
#endif
|
||||
|
||||
NTSTATUS
|
||||
ClassDeviceHwFirmwareGetInfoProcess(
|
||||
|
|
|
@ -985,7 +985,7 @@ DiskIoctlSmartSendDriveCommand(
|
|||
IN OUT PIRP Irp
|
||||
);
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
PCDB
|
||||
GetSrbScsiData(
|
||||
_In_ PSTORAGE_REQUEST_BLOCK SrbEx,
|
||||
|
@ -1175,7 +1175,7 @@ Return Value:
|
|||
return Cdb;
|
||||
}
|
||||
|
||||
__inline
|
||||
FORCEINLINE // __REACTOS__
|
||||
VOID
|
||||
SetSrbScsiData(
|
||||
_In_ PSTORAGE_REQUEST_BLOCK SrbEx,
|
||||
|
|
|
@ -267,7 +267,7 @@ GUID DiskPredictFailureEventGuid = WMI_STORAGE_PREDICT_FAILURE_EVENT_GUID;
|
|||
//
|
||||
// Enable SMART
|
||||
//
|
||||
_inline NTSTATUS
|
||||
static NTSTATUS
|
||||
DiskEnableSmart(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
|
@ -289,7 +289,7 @@ DiskEnableSmart(
|
|||
//
|
||||
// Disable SMART
|
||||
//
|
||||
_inline NTSTATUS
|
||||
static NTSTATUS
|
||||
DiskDisableSmart(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
|
@ -307,7 +307,7 @@ DiskDisableSmart(
|
|||
&bufferSize);
|
||||
}
|
||||
|
||||
|
||||
#ifndef __REACTOS__ // functions are not used
|
||||
//
|
||||
// Enable Attribute Autosave
|
||||
//
|
||||
|
@ -350,12 +350,12 @@ DiskDisableSmartAttributeAutosave(
|
|||
(PSRB_IO_CONTROL)srbControl,
|
||||
&bufferSize);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Initialize execution of SMART online diagnostics
|
||||
//
|
||||
_inline NTSTATUS
|
||||
static NTSTATUS
|
||||
DiskExecuteSmartDiagnostics(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
UCHAR Subcommand
|
||||
|
|
|
@ -45,13 +45,13 @@ typedef struct _STORAGE_DEVICE_LAYOUT_SIGNATURE
|
|||
} DeviceSpecific;
|
||||
} STORAGE_DEVICE_LAYOUT_SIGNATURE, *PSTORAGE_DEVICE_LAYOUT_SIGNATURE;
|
||||
|
||||
inline
|
||||
FORCEINLINE
|
||||
DUID_MATCH_STATUS
|
||||
CompareStorageDuids(
|
||||
_In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid1,
|
||||
_In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid2);
|
||||
|
||||
inline
|
||||
FORCEINLINE
|
||||
DUID_MATCH_STATUS
|
||||
CompareStorageDuids(
|
||||
_In_ PSTORAGE_DEVICE_UNIQUE_IDENTIFIER Duid1,
|
||||
|
|
Loading…
Reference in a new issue