Fixed a few non portable zero-size array declarations.
This commit is contained in:
parent
34ed4fd40f
commit
ab170a9c84
|
@ -186,7 +186,7 @@ static void
|
|||
ASPI_PrintSenseArea(SRB_ExecSCSICmd *prb)
|
||||
{
|
||||
int i;
|
||||
BYTE *rqbuf = &prb->CDBByte[16];
|
||||
BYTE *rqbuf = prb->SenseArea;
|
||||
|
||||
if (TRACE_ON(aspi))
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB)
|
|||
sense_len = 16;
|
||||
|
||||
/* CDB is fixed in WNASPI32 */
|
||||
memcpy(&lpPRB->CDBByte[16], &sg_reply_hdr->sense_buffer[0], sense_len);
|
||||
memcpy(lpPRB->SenseArea, &sg_reply_hdr->sense_buffer[0], sense_len);
|
||||
|
||||
TRACE("CDB is %d bytes long\n", lpPRB->SRB_CDBLen );
|
||||
ASPI_PrintSenseArea(lpPRB);
|
||||
|
|
|
@ -3238,7 +3238,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
|
|||
DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags, lpMidiStrm->hDevice,
|
||||
MM_MOM_POSITIONCB, lpwm->mod.dwInstance, (LPARAM)lpMidiHdr, 0L);
|
||||
}
|
||||
lpMidiHdr->dwOffset += sizeof(MIDIEVENT);
|
||||
lpMidiHdr->dwOffset += sizeof(MIDIEVENT) - sizeof(me->dwParms);
|
||||
if (me->dwEvent & MEVT_F_LONG)
|
||||
lpMidiHdr->dwOffset += (MEVT_EVENTPARM(me->dwEvent) + 3) & ~3;
|
||||
if (lpMidiHdr->dwOffset >= lpMidiHdr->dwBufferLength) {
|
||||
|
|
|
@ -562,7 +562,7 @@ typedef struct {
|
|||
* event and the current event. */
|
||||
DWORD dwStreamID; /* Reserved; must be zero. */
|
||||
DWORD dwEvent; /* event => see MEVT_XXX macros */
|
||||
DWORD dwParms[0]; /* extra pmts to dwEvent if F_LONG is set */
|
||||
DWORD dwParms[1]; /* extra pmts to dwEvent if F_LONG is set */
|
||||
} MIDIEVENT, *LPMIDIEVENT;
|
||||
|
||||
#define MEVT_EVENTTYPE(x) ((BYTE) (((x)>>24)&0xFF))
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef struct tagSRB16_ExecSCSICmd {
|
|||
BYTE SRB_TargStat; /* Target Status (R) */
|
||||
FARPROC16 SRB_PostProc; /* Post routine (W) */
|
||||
BYTE SRB_Rsvd2[34]; /* Reserved, MUST = 0 */
|
||||
BYTE CDBByte[0]; /* SCSI CBD - variable length (W) */
|
||||
BYTE CDBByte[1]; /* SCSI CBD - variable length (W) */
|
||||
/* variable example for 6 byte cbd
|
||||
* BYTE CDBByte[6]; * SCSI CDB (W) *
|
||||
* BYTE SenseArea6[SENSE_LEN]; * Request Sense buffer (R) *
|
||||
|
|
|
@ -136,7 +136,7 @@ typedef struct tagSRB32_ExecSCSICmd {
|
|||
void *SRB_Rsvd2; /* Reserved */
|
||||
BYTE SRB_Rsvd3[16]; /* Reserved for expansion */
|
||||
BYTE CDBByte[16]; /* SCSI CDB */
|
||||
BYTE SenseArea[0]; /* Request sense buffer - var length */
|
||||
BYTE SenseArea[SENSE_LEN+2]; /* Request sense buffer - var length */
|
||||
} SRB_ExecSCSICmd, *PSRB_ExecSCSICmd;
|
||||
|
||||
/* SRB - ABORT AN ARB - SC_ABORT_SRB */
|
||||
|
|
|
@ -22,12 +22,12 @@ DOSASPI_PostProc( SRB_ExecSCSICmd *lpPRB )
|
|||
LPSRB16 lpSRB16;
|
||||
|
||||
|
||||
memcpy(&ptrSRB,(LPBYTE)(lpPRB+1)+lpPRB->SRB_SenseLen,sizeof(DWORD));
|
||||
memcpy(&ptrSRB,lpPRB->SenseArea + lpPRB->SRB_SenseLen,sizeof(DWORD));
|
||||
TRACE("Copying data back to DOS client at 0x%8lx\n",ptrSRB);
|
||||
lpSRB16 = DOSMEM_MapRealToLinear(ptrSRB);
|
||||
lpSRB16->cmd.SRB_TargStat = lpPRB->SRB_TargStat;
|
||||
lpSRB16->cmd.SRB_HaStat = lpPRB->SRB_HaStat;
|
||||
memcpy((LPBYTE)(lpSRB16+1)+lpSRB16->cmd.SRB_CDBLen,&lpPRB->SenseArea[0],lpSRB16->cmd.SRB_SenseLen);
|
||||
memcpy(lpSRB16->cmd.CDBByte + lpSRB16->cmd.SRB_CDBLen,lpPRB->SenseArea,lpSRB16->cmd.SRB_SenseLen);
|
||||
|
||||
/* Now do posting */
|
||||
if( lpPRB->SRB_Status == SS_SECURITY_VIOLATION )
|
||||
|
@ -135,7 +135,7 @@ DWORD ASPI_SendASPIDOSCommand(DWORD ptrSRB)
|
|||
lpPRB->SRB_PostProc = &DOSASPI_PostProc;
|
||||
|
||||
/* Stick the DWORD after all the sense info */
|
||||
memcpy((LPBYTE)(lpPRB+1)+lpPRB->SRB_SenseLen,&ptrSRB,sizeof(DWORD));
|
||||
memcpy(lpPRB->SenseArea + lpPRB->SRB_SenseLen,&ptrSRB,sizeof(DWORD));
|
||||
retval = (*pSendASPI32Command)((LPSRB)lpPRB);
|
||||
break;
|
||||
case SC_ABORT_SRB:
|
||||
|
|
Loading…
Reference in New Issue