1
0
Fork 0

silence some warnings, add most of sf patch #1185267 by Moe

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2883
This commit is contained in:
Sebastian Strohhäcker 2007-06-12 20:22:09 +00:00
parent 8c6d24bb61
commit 0c24e87fdc
49 changed files with 265 additions and 255 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.h,v 1.20 2007-06-03 16:46:33 c2woody Exp $ */
/* $Id: callback.h,v 1.21 2007-06-12 20:22:07 c2woody Exp $ */
#ifndef DOSBOX_CALLBACK_H
#define DOSBOX_CALLBACK_H
@ -43,10 +43,10 @@ enum {
extern Bit8u lastint;
INLINE RealPt CALLBACK_RealPointer(Bitu callback) {
return RealMake(CB_SEG,callback*CB_SIZE);
return RealMake(CB_SEG,(Bit16u)(callback*CB_SIZE));
}
INLINE PhysPt CALLBACK_PhysPointer(Bitu callback) {
return PhysMake(CB_SEG,callback*CB_SIZE);
return PhysMake(CB_SEG,(Bit16u)(callback*CB_SIZE));
}
INLINE PhysPt CALLBACK_GetBase(void) {

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_inc.h,v 1.66 2007-06-06 15:44:40 c2woody Exp $ */
/* $Id: dos_inc.h,v 1.67 2007-06-12 20:22:07 c2woody Exp $ */
#ifndef DOSBOX_DOS_INC_H
#define DOSBOX_DOS_INC_H
@ -260,9 +260,9 @@ public:
}
INLINE void SaveIt(Bitu size,PhysPt addr,Bitu val) {
switch (size) {
case 1:mem_writeb(pt+addr,val);break;
case 2:mem_writew(pt+addr,val);break;
case 4:mem_writed(pt+addr,val);break;
case 1:mem_writeb(pt+addr,(Bit8u)val);break;
case 2:mem_writew(pt+addr,(Bit16u)val);break;
case 4:mem_writed(pt+addr,(Bit32u)val);break;
}
}
INLINE void SetPt(Bit16u seg) { pt=PhysMake(seg,0);}
@ -283,14 +283,14 @@ public:
void SaveVectors (void);
void RestoreVectors (void);
void SetSize (Bit16u size) { sSave(sPSP,next_seg,size); };
Bit16u GetSize (void) { return sGet(sPSP,next_seg); };
Bit16u GetSize (void) { return (Bit16u)sGet(sPSP,next_seg); };
void SetEnvironment (Bit16u envseg) { sSave(sPSP,environment,envseg); };
Bit16u GetEnvironment (void) { return sGet(sPSP,environment); };
Bit16u GetEnvironment (void) { return (Bit16u)sGet(sPSP,environment); };
Bit16u GetSegment (void) { return seg; };
void SetFileHandle (Bit16u index, Bit8u handle);
Bit8u GetFileHandle (Bit16u index);
void SetParent (Bit16u parent) { sSave(sPSP,psp_parent,parent); };
Bit16u GetParent (void) { return sGet(sPSP,psp_parent); };
Bit16u GetParent (void) { return (Bit16u)sGet(sPSP,psp_parent); };
void SetStack (RealPt stackpt) { sSave(sPSP,stack,stackpt); };
RealPt GetStack (void) { return sGet(sPSP,stack); };
void SetInt22 (RealPt int22pt) { sSave(sPSP,int_22,int22pt); };
@ -458,8 +458,8 @@ public:
void SetDirID(Bit16u entry) { sSave(sDTA,dirID,entry); };
void SetDirIDCluster(Bit16u entry) { sSave(sDTA,dirCluster,entry); };
Bit16u GetDirID(void) { return sGet(sDTA,dirID); };
Bit16u GetDirIDCluster(void) { return sGet(sDTA,dirCluster); };
Bit16u GetDirID(void) { return (Bit16u)sGet(sDTA,dirID); };
Bit16u GetDirIDCluster(void) { return (Bit16u)sGet(sDTA,dirCluster); };
private:
#ifdef _MSC_VER
#pragma pack(1)
@ -540,9 +540,9 @@ public:
void SetType(Bit8u _type) { sSave(sMCB,type,_type);}
void SetSize(Bit16u _size) { sSave(sMCB,size,_size);}
void SetPSPSeg(Bit16u _pspseg) { sSave(sMCB,psp_segment,_pspseg);}
Bit8u GetType(void) { return sGet(sMCB,type);}
Bit16u GetSize(void) { return sGet(sMCB,size);}
Bit16u GetPSPSeg(void) { return sGet(sMCB,psp_segment);}
Bit8u GetType(void) { return (Bit8u)sGet(sMCB,type);}
Bit16u GetSize(void) { return (Bit16u)sGet(sMCB,size);}
Bit16u GetPSPSeg(void) { return (Bit16u)sGet(sMCB,psp_segment);}
private:
#ifdef _MSC_VER
#pragma pack (1)
@ -566,9 +566,9 @@ public:
void SetDrive(Bit8u _drive) { sSave(sSDA,current_drive, _drive); }
void SetDTA(Bit32u _dta) { sSave(sSDA,current_dta, _dta); }
void SetPSP(Bit16u _psp) { sSave(sSDA,current_psp, _psp); }
Bit8u GetDrive(void) { return sGet(sSDA,current_drive); }
Bit16u GetPSP(void) { return sGet(sSDA,current_psp); }
Bit32u GetDTA(void) { return sGet(sSDA,current_dta); }
Bit8u GetDrive(void) { return (Bit8u)sGet(sSDA,current_drive); }
Bit16u GetPSP(void) { return (Bit16u)sGet(sSDA,current_psp); }
Bit32u GetDTA(void) { return (Bit32u)sGet(sSDA,current_dta); }
private:

View file

@ -114,8 +114,8 @@ INLINE void FPU_SetTag(Bit16u tag){
}
INLINE void FPU_SetCW(Bitu word){
fpu.cw = word;
fpu.cw_mask_all = word | 0x3f;
fpu.cw = (Bit16u)word;
fpu.cw_mask_all = (Bit16u)(word | 0x3f);
fpu.round = (FPU_Round)((word >> 10) & 3);
}

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: inout.h,v 1.10 2007-01-08 19:45:37 qbix79 Exp $ */
/* $Id: inout.h,v 1.11 2007-06-12 20:22:07 c2woody Exp $ */
#ifndef DOSBOX_INOUT_H
#define DOSBOX_INOUT_H
@ -72,7 +72,7 @@ INLINE void IO_Write(Bitu port,Bit8u val) {
IO_WriteB(port,val);
}
INLINE Bit8u IO_Read(Bitu port){
return IO_ReadB(port);
return (Bit8u)IO_ReadB(port);
}
#endif

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: paging.h,v 1.24 2007-01-08 19:45:37 qbix79 Exp $ */
/* $Id: paging.h,v 1.25 2007-06-12 20:22:07 c2woody Exp $ */
#ifndef DOSBOX_PAGING_H
#define DOSBOX_PAGING_H
@ -179,7 +179,7 @@ bool mem_unalignedwrited_checked_x86(PhysPt address,Bit32u val);
INLINE Bit8u mem_readb_inline(PhysPt address) {
Bitu index=(address>>12);
if (paging.tlb.read[index]) return host_readb(paging.tlb.read[index]+address);
else return paging.tlb.handler[index]->readb(address);
else return (Bit8u)paging.tlb.handler[index]->readb(address);
}
INLINE Bit16u mem_readw_inline(PhysPt address) {
@ -187,7 +187,7 @@ INLINE Bit16u mem_readw_inline(PhysPt address) {
Bitu index=(address>>12);
if (paging.tlb.read[index]) return host_readw(paging.tlb.read[index]+address);
else return paging.tlb.handler[index]->readw(address);
else return (Bit16u) paging.tlb.handler[index]->readw(address);
} else return mem_unalignedreadw(address);
}
@ -231,7 +231,7 @@ INLINE Bit16u mem_readw_dyncorex86(PhysPt address) {
Bitu index=(address>>12);
if (paging.tlb.read[index]) return host_readw(paging.tlb.read[index]+address);
else return paging.tlb.handler[index]->readw(address);
else return (Bit16u)paging.tlb.handler[index]->readw(address);
} else return mem_unalignedreadw(address);
}

View file

@ -98,7 +98,7 @@ INLINE PhysPt SegPhys(SegNames index) {
}
INLINE Bit16u SegValue(SegNames index) {
return Segs.val[index];
return (Bit16u)Segs.val[index];
}
INLINE RealPt RealMakeSeg(SegNames index,Bit16u off) {