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:
parent
8c6d24bb61
commit
0c24e87fdc
49 changed files with 265 additions and 255 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: cdrom_aspi_win32.cpp,v 1.17 2007-01-08 19:45:39 qbix79 Exp $ */
|
||||
/* $Id: cdrom_aspi_win32.cpp,v 1.18 2007-06-12 20:22:07 c2woody Exp $ */
|
||||
|
||||
#if defined (WIN32)
|
||||
|
||||
|
@ -148,7 +148,6 @@ bool CDROM_Interface_Aspi::ScanRegistryFindKey(HKEY& hKeyBase)
|
|||
ULONG result,newKeyResult;
|
||||
char subKey[256];
|
||||
char buffer[256];
|
||||
ULONG bufferSize = 256;
|
||||
ULONG subKeySize = 256;
|
||||
HKEY hNewKey;
|
||||
|
||||
|
@ -596,7 +595,6 @@ bool CDROM_Interface_Aspi::GetUPC(unsigned char& attr, char* upcdata)
|
|||
|
||||
// attr = (upc.ADR<<4) | upc.Control;
|
||||
attr = 0;
|
||||
int pos = 0;
|
||||
// Convert to mscdex format
|
||||
for (int i=0; i<7; i++) upcdata[i] = upc.MediaCatalog[i];
|
||||
for (int i=0; i<7; i++) upcdata[i] = (upc.MediaCatalog[i*2] << 4) | (upc.MediaCatalog[i*2+1] & 0x0F);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: cdrom_image.cpp,v 1.15 2007-02-22 08:36:25 qbix79 Exp $ */
|
||||
/* $Id: cdrom_image.cpp,v 1.16 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
|
@ -190,7 +190,7 @@ bool CDROM_Interface_Image::GetAudioTracks(int& stTrack, int& end, TMSF& leadOut
|
|||
|
||||
bool CDROM_Interface_Image::GetAudioTrackInfo(int track, TMSF& start, unsigned char& attr)
|
||||
{
|
||||
if (track < 1 || track > tracks.size()) return false;
|
||||
if (track < 1 || track > (int)tracks.size()) return false;
|
||||
FRAMES_TO_MSF(tracks[track - 1].start + 150, &start.min, &start.sec, &start.fr);
|
||||
attr = tracks[track - 1].attr;
|
||||
return true;
|
||||
|
@ -254,7 +254,7 @@ bool CDROM_Interface_Image::ReadSectors(PhysPt buffer, bool raw, unsigned long s
|
|||
Bit8u* buf = new Bit8u[buflen];
|
||||
|
||||
bool success = true; //Gobliiins reads 0 sectors
|
||||
for(int i = 0; i < num; i++) {
|
||||
for(unsigned long i = 0; i < num; i++) {
|
||||
success = ReadSector(&buf[i * sectorSize], raw, sector + i);
|
||||
if (!success) break;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ void CDROM_Interface_Image::CDAudioCallBack(Bitu len)
|
|||
}
|
||||
|
||||
SDL_mutexP(player.mutex);
|
||||
while (player.bufLen < len) {
|
||||
while (player.bufLen < (Bits)len) {
|
||||
bool success;
|
||||
if (player.targetFrame > player.currFrame)
|
||||
success = player.cd->ReadSector(&player.buffer[player.bufLen], true, player.currFrame);
|
||||
|
@ -607,7 +607,7 @@ bool CDROM_Interface_Image::GetRealFileName(string &filename, string &pathname)
|
|||
bool CDROM_Interface_Image::GetCueKeyword(string &keyword, istream &in)
|
||||
{
|
||||
in >> keyword;
|
||||
for(int i = 0; i < keyword.size(); i++) keyword[i] = toupper(keyword[i]);
|
||||
for(Bitu i = 0; i < keyword.size(); i++) keyword[i] = toupper(keyword[i]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos.cpp,v 1.100 2007-04-16 12:23:23 c2woody Exp $ */
|
||||
/* $Id: dos.cpp,v 1.101 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -45,11 +45,11 @@ void DOS_SetError(Bit16u code) {
|
|||
#define DATA_TRANSFERS_TAKE_CYCLES 1
|
||||
#ifdef DATA_TRANSFERS_TAKE_CYCLES
|
||||
#include "cpu.h"
|
||||
static inline void modify_cycles(Bitu value) {
|
||||
static inline void modify_cycles(Bits value) {
|
||||
if((4*value+5) < CPU_Cycles) CPU_Cycles -= 4*value; else CPU_Cycles = 5;
|
||||
}
|
||||
#else
|
||||
static inline void modify_cycles(Bitu /* value */) {
|
||||
static inline void modify_cycles(Bits /* value */) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_classes.cpp,v 1.50 2007-05-29 13:36:45 qbix79 Exp $ */
|
||||
/* $Id: dos_classes.cpp,v 1.51 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -179,7 +179,7 @@ Bit16u DOS_PSP::rootpsp = 0;
|
|||
|
||||
void DOS_PSP::MakeNew(Bit16u mem_size) {
|
||||
/* get previous */
|
||||
DOS_PSP prevpsp(dos.psp());
|
||||
// DOS_PSP prevpsp(dos.psp());
|
||||
/* Clear it first */
|
||||
Bitu i;
|
||||
for (i=0;i<sizeof(sPSP);i++) mem_writeb(pt+i,0);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_files.cpp,v 1.84 2007-05-10 20:27:48 c2woody Exp $ */
|
||||
/* $Id: dos_files.cpp,v 1.85 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -124,7 +124,7 @@ bool DOS_MakeName(char * name,char * fullname,Bit8u * drive) {
|
|||
|
||||
Bit32s iDown, cDots;
|
||||
bool dots = true;
|
||||
Bit32u templen =strlen(tempdir);
|
||||
Bit32s templen=(Bit32s)strlen(tempdir);
|
||||
for(iDown=0;(iDown < templen) && dots;iDown++)
|
||||
if(tempdir[iDown] != '.')
|
||||
dots = false;
|
||||
|
@ -133,7 +133,7 @@ bool DOS_MakeName(char * name,char * fullname,Bit8u * drive) {
|
|||
cDots = templen - 1;
|
||||
if(dots && (cDots > 0))
|
||||
{
|
||||
for(iDown=strlen(fullname)-1;iDown>=0;iDown--)
|
||||
for(iDown=(Bit32s)strlen(fullname)-1;iDown>=0;iDown--)
|
||||
{
|
||||
if(fullname[iDown]=='\\' || iDown==0)
|
||||
{
|
||||
|
@ -935,7 +935,8 @@ Bit8u DOS_FCBRandomRead(Bit16u seg,Bit16u offset,Bit16u numRec,bool restore) {
|
|||
*/
|
||||
|
||||
DOS_FCB fcb(seg,offset);
|
||||
Bit32u random;Bit16u old_block;Bit8u old_rec;Bit8u error;
|
||||
Bit32u random;Bit16u old_block;Bit8u old_rec;
|
||||
Bit8u error=0;
|
||||
|
||||
/* Set the correct record from the random data */
|
||||
fcb.GetRandom(random);
|
||||
|
@ -957,7 +958,8 @@ Bit8u DOS_FCBRandomRead(Bit16u seg,Bit16u offset,Bit16u numRec,bool restore) {
|
|||
Bit8u DOS_FCBRandomWrite(Bit16u seg,Bit16u offset,Bit16u numRec,bool restore) {
|
||||
/* see FCB_RandomRead */
|
||||
DOS_FCB fcb(seg,offset);
|
||||
Bit32u random;Bit16u old_block;Bit8u old_rec;Bit8u error;
|
||||
Bit32u random;Bit16u old_block;Bit8u old_rec;
|
||||
Bit8u error=0;
|
||||
|
||||
/* Set the correct record from the random data */
|
||||
fcb.GetRandom(random);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_mscdex.cpp,v 1.46 2007-04-15 11:39:33 c2woody Exp $ */
|
||||
/* $Id: dos_mscdex.cpp,v 1.47 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -321,11 +321,11 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit)
|
|||
|
||||
//Link it in the device chain
|
||||
Bit32u start = dos_infoblock.GetDeviceChain();
|
||||
Bit16u segm = start>>16;
|
||||
Bit16u offm = start&0xFFFF;
|
||||
Bit16u segm = (Bit16u)(start>>16);
|
||||
Bit16u offm = (Bit16u)(start&0xFFFF);
|
||||
while(start != 0xFFFFFFFF) {
|
||||
segm = start>>16;
|
||||
offm = start&0xFFFF;
|
||||
segm = (Bit16u)(start>>16);
|
||||
offm = (Bit16u)(start&0xFFFF);
|
||||
start = real_readd(segm,offm);
|
||||
}
|
||||
real_writed(segm,offm,seg<<16);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_programs.cpp,v 1.73 2007-06-04 18:09:27 qbix79 Exp $ */
|
||||
/* $Id: dos_programs.cpp,v 1.74 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include <stdlib.h>
|
||||
|
@ -1105,7 +1105,9 @@ public:
|
|||
MSCDEX_SetCDInterface(CDROM_USE_SDL, -1);
|
||||
// create new drives for all images
|
||||
std::vector<DOS_Drive*> isoDisks;
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
std::vector<std::string>::size_type i;
|
||||
std::vector<DOS_Drive*>::size_type ct;
|
||||
for (i = 0; i < paths.size(); i++) {
|
||||
int error = -1;
|
||||
DOS_Drive* newDrive = new isoDrive(drive, paths[i].c_str(), mediaid, error);
|
||||
isoDisks.push_back(newDrive);
|
||||
|
@ -1121,15 +1123,15 @@ public:
|
|||
}
|
||||
// error: clean up and leave
|
||||
if (error) {
|
||||
for(int i = 0; i < isoDisks.size(); i++) {
|
||||
delete isoDisks[i];
|
||||
for(ct = 0; ct < isoDisks.size(); ct++) {
|
||||
delete isoDisks[ct];
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Update DriveManager
|
||||
for(int i = 0; i < isoDisks.size(); i++) {
|
||||
DriveManager::AppendDisk(drive - 'A', isoDisks[i]);
|
||||
for(ct = 0; ct < isoDisks.size(); ct++) {
|
||||
DriveManager::AppendDisk(drive - 'A', isoDisks[ct]);
|
||||
}
|
||||
DriveManager::InitializeDrive(drive - 'A');
|
||||
|
||||
|
@ -1139,7 +1141,7 @@ public:
|
|||
// Print status message (success)
|
||||
WriteOut(MSG_Get("MSCDEX_SUCCESS"));
|
||||
std::string tmp(paths[0]);
|
||||
for (int i = 1; i < paths.size(); i++) {
|
||||
for (i = 1; i < paths.size(); i++) {
|
||||
tmp += "; " + paths[i];
|
||||
}
|
||||
WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"), drive, tmp.c_str());
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_tables.cpp,v 1.27 2007-06-06 15:44:40 c2woody Exp $ */
|
||||
/* $Id: dos_tables.cpp,v 1.28 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "mem.h"
|
||||
|
@ -73,7 +73,7 @@ static Bit8u country_info[0x22] = {
|
|||
};
|
||||
|
||||
void DOS_SetupTables(void) {
|
||||
Bit16u seg,seg2;Bitu i;
|
||||
Bit16u seg;Bitu i;
|
||||
dos.tables.mediaid=RealMake(DOS_GetMemory(4),0);
|
||||
dos.tables.tempdta=RealMake(DOS_GetMemory(4),0);
|
||||
dos.tables.tempdta_fcbdelete=RealMake(DOS_GetMemory(4),0);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_cache.cpp,v 1.49 2007-01-08 19:45:39 qbix79 Exp $ */
|
||||
/* $Id: drive_cache.cpp,v 1.50 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include "drives.h"
|
||||
#include "dos_inc.h"
|
||||
|
@ -242,7 +242,7 @@ void DOS_Drive_Cache::AddEntry(const char* path, bool checkExists)
|
|||
Bit32u i;
|
||||
// Check if there are any open search dir that are affected by this...
|
||||
if (dir) for (i=0; i<MAX_OPENDIRS; i++) {
|
||||
if ((dirSearch[i]==dir) && (index<=dirSearch[i]->nextEntry))
|
||||
if ((dirSearch[i]==dir) && ((Bit32u)index<=dirSearch[i]->nextEntry))
|
||||
dirSearch[i]->nextEntry++;
|
||||
}
|
||||
};
|
||||
|
@ -378,7 +378,7 @@ Bit16u DOS_Drive_Cache::CreateShortNameID(CFileInfo* curDir, const char* name)
|
|||
do {
|
||||
foundNr = curDir->longNameList[mid]->shortNr;
|
||||
mid++;
|
||||
} while(mid<curDir->longNameList.size() && (CompareShortname(name,curDir->longNameList[mid]->shortname)==0));
|
||||
} while((Bitu)mid<curDir->longNameList.size() && (CompareShortname(name,curDir->longNameList[mid]->shortname)==0));
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_fat.cpp,v 1.20 2007-01-08 19:45:39 qbix79 Exp $ */
|
||||
/* $Id: drive_fat.cpp,v 1.21 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -408,6 +408,7 @@ bool fatDrive::getFileDirEntry(char * filename, direntry * useEntry, Bit32u * di
|
|||
char * findDir;
|
||||
char * findFile;
|
||||
strcpy(dirtoken,filename);
|
||||
findFile=dirtoken;
|
||||
|
||||
/* Skip if testing in root directory */
|
||||
if ((len>0) && (filename[len-1]!='\\')) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_iso.cpp,v 1.17 2007-01-21 16:21:22 c2woody Exp $ */
|
||||
/* $Id: drive_iso.cpp,v 1.18 2007-06-12 20:22:08 c2woody Exp $ */
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
|
@ -65,11 +65,11 @@ isoFile::isoFile(isoDrive *drive, const char *name, FileStat_Block *stat, Bit32u
|
|||
bool isoFile::Read(Bit8u *data, Bit16u *size)
|
||||
{
|
||||
if (filePos + *size > fileEnd)
|
||||
*size = fileEnd - filePos;
|
||||
*size = (Bit16u)(fileEnd - filePos);
|
||||
|
||||
Bit16u nowSize = 0;
|
||||
int sector = filePos / ISO_FRAMESIZE;
|
||||
Bit16u sectorPos = filePos % ISO_FRAMESIZE;
|
||||
Bit16u sectorPos = (Bit16u)(filePos % ISO_FRAMESIZE);
|
||||
|
||||
if (sector != cachedSector) {
|
||||
if (drive->readSector(buffer, sector)) cachedSector = sector;
|
||||
|
@ -272,7 +272,7 @@ bool isoDrive::FindFirst(char *dir, DOS_DTA &dta, bool fcb_findfirst)
|
|||
}
|
||||
|
||||
// get a directory iterator and save its id in the dta
|
||||
dta.SetDirID(GetDirIterator(&de));
|
||||
dta.SetDirID((Bit16u)GetDirIterator(&de));
|
||||
|
||||
Bit8u attr;
|
||||
char pattern[ISO_MAXPATHNAME];
|
||||
|
@ -532,7 +532,7 @@ bool isoDrive :: loadImage()
|
|||
isoPVD pvd;
|
||||
readSector((Bit8u*)(&pvd), ISO_FIRST_VD);
|
||||
if (pvd.type != 1 || strncmp((char*)pvd.standardIdent, "CD001", 5) || pvd.version != 1) return false;
|
||||
return (readDirEntry(&this->rootEntry, pvd.rootEntry));
|
||||
return (readDirEntry(&this->rootEntry, pvd.rootEntry)>0);
|
||||
}
|
||||
|
||||
bool isoDrive :: lookup(isoDirEntry *de, const char *path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue