Fix a few compiler warnings

Mostly uninitialized class members.  Should not cause a change in
behavior.
This commit is contained in:
Andy McFadden 2021-05-09 18:17:49 -07:00
parent adaeb2c6eb
commit eff69cce86
14 changed files with 284 additions and 139 deletions

View File

@ -227,7 +227,7 @@ BEGIN
PUSHBUTTON "Enter registration code",IDC_ABOUT_ENTER_REG,157,132,86,14
CONTROL IDB_FSLOGO,IDC_STATIC,"Static",SS_BITMAP,7,6,64,59
LTEXT "CiderPress v%d.%d.%d%ls%ls",IDC_CIDERPRESS_VERS_TEXT,77,7,167,9
LTEXT "Copyright © 2017 by CiderPress project authors.\rAll Rights Reserved.",IDC_STATIC,77,20,167,19
LTEXT "Copyright © 2021 by CiderPress project authors.\rAll Rights Reserved.",IDC_STATIC,77,20,167,19
ICON IDR_MAINFRAME,IDC_STATIC,77,45,20,20
ICON IDI_FILE_NUFX,IDC_STATIC,106,45,20,20
ICON IDI_FILE_BINARY2,IDC_STATIC,136,45,20,20

View File

@ -1798,8 +1798,8 @@ bail:
DIError DiskArchive::AddForksToDisk(DiskFS* pDiskFS,
const DiskFS::CreateParms* pParms,
const unsigned char* dataBuf, long dataLen,
const unsigned char* rsrcBuf, long rsrcLen) const
const uint8_t* dataBuf, long dataLen,
const uint8_t* rsrcBuf, long rsrcLen) const
{
DIError dierr = kDIErrNone;
const int kFileTypeBIN = 0x06;

View File

@ -186,11 +186,11 @@ private:
class SectorEditDialog : public DiskEditDialog {
public:
SectorEditDialog(CWnd* pParentWnd = NULL) :
DiskEditDialog(IDD_DISKEDIT, pParentWnd)
{
fTrack = 0;
fSector = 0;
}
DiskEditDialog(IDD_DISKEDIT, pParentWnd),
fTrack(0),
fSector(0),
fSectorData()
{ }
virtual ~SectorEditDialog() {}
virtual int LoadData(void) override; // load the current track/sector
@ -234,11 +234,15 @@ protected:
class SectorFileEditDialog : public SectorEditDialog {
public:
SectorFileEditDialog(SectorEditDialog* pSectEdit, CWnd* pParentWnd = NULL):
SectorEditDialog(pParentWnd)
SectorEditDialog(pParentWnd),
fOpenRsrcFork(false),
fpFile(NULL),
fpOpenFile(NULL),
fSectorIdx(0),
fLength(0)
{
DiskEditDialog::Setup(pSectEdit->GetDiskFS(),
pSectEdit->GetFileName());
fSectorIdx = 0;
}
virtual ~SectorFileEditDialog() {}
@ -326,7 +330,12 @@ protected:
class BlockFileEditDialog : public BlockEditDialog {
public:
BlockFileEditDialog(BlockEditDialog* pBlockEdit, CWnd* pParentWnd = NULL) :
BlockEditDialog(pParentWnd)
BlockEditDialog(pParentWnd),
fOpenRsrcFork(false),
fpFile(NULL),
fpOpenFile(NULL),
fBlockIdx(0),
fLength(0)
{
DiskEditDialog::Setup(pBlockEdit->GetDiskFS(),
pBlockEdit->GetFileName());
@ -379,10 +388,11 @@ private:
class NibbleEditDialog : public DiskEditDialog {
public:
NibbleEditDialog(CWnd* pParentWnd = NULL) :
DiskEditDialog(IDD_DISKEDIT, pParentWnd)
{
fTrack = 0;
}
DiskEditDialog(IDD_DISKEDIT, pParentWnd),
fTrack(0),
fNibbleData(),
fNibbleDataLen(0)
{ }
virtual ~NibbleEditDialog() {}
virtual int LoadData(void) override; // load the current track/sector

View File

@ -17,7 +17,12 @@
class EOLScanDialog : public CDialog {
public:
EOLScanDialog(CWnd* pParentWnd = NULL) :
CDialog(IDD_EOLSCAN, pParentWnd)
CDialog(IDD_EOLSCAN, pParentWnd),
fCountChars(0),
fCountCR(0),
fCountLF(0),
fCountCRLF(0),
fCountHighASCII(0)
{}
virtual ~EOLScanDialog(void) {}

View File

@ -71,8 +71,8 @@ public:
void ApplyNow(PrefsSheet*);
// get the text of the next file in the selection list
int GetPrevFileText(ReformatHolder* pHolder, CString* pTitle);
int GetNextFileText(ReformatHolder* pHolder, CString* pTitle);
//int GetPrevFileText(ReformatHolder* pHolder, CString* pTitle);
//int GetNextFileText(ReformatHolder* pHolder, CString* pTitle);
// update the progress meter
void SetProgressBegin(void);
@ -607,7 +607,7 @@ private:
*/
void HandleView(void);
void DeleteFileOnExit(const WCHAR* name);
//void DeleteFileOnExit(const WCHAR* name);
/*
* Close and re-open the current archive.

View File

@ -1787,7 +1787,7 @@ long MainWindow::SSTGetBufOffset(int track)
return offset;
}
long MainWindow::SSTCountBadBytes(const unsigned char* sctBuf, int count)
long MainWindow::SSTCountBadBytes(const uint8_t* sctBuf, int count)
{
long badCount = 0;
unsigned char uch;
@ -1802,7 +1802,7 @@ long MainWindow::SSTCountBadBytes(const unsigned char* sctBuf, int count)
return badCount;
}
void MainWindow::SSTProcessTrackData(unsigned char* trackBuf)
void MainWindow::SSTProcessTrackData(uint8_t* trackBuf)
{
unsigned char* trackPtr;
int track;
@ -1812,7 +1812,7 @@ void MainWindow::SSTProcessTrackData(unsigned char* trackBuf)
{
bool inRun;
int start, longestStart;
int count7f, longest = -1;
int count7f = 0, longest = -1;
int i;
inRun = false;

View File

@ -211,6 +211,10 @@ DiskImg::DiskImg(void)
fNumBlocks = -1;
fpScanProgressCallback = NULL;
fScanProgressCookie = NULL;
fScanCount = 0;
fScanMsg[0] = '\0';
fScanLastMsgWhen = 0;
/*
* Create a working copy of the nibble descr table. We want to leave

View File

@ -1472,13 +1472,15 @@ public:
* The filename returned is defined to be null-terminated Mac OS Roman.
* For most filesystems this is automatic, as filenames are restricted
* to ASCII, but for DOS 3.3 it requires stripping high bits. It also
* means that embedded nulls in HFS filenames (which are discouraged but
* allowed) will be lost.
* means that embedded nulls will be lost. (Some HFS references indicate
* that '\0' is allowed, but I think people assume that because the API
* uses a string with an explicit length. Looking at "Inside Mac: Files"
* chapter 2, page 2-71, HFS filenames are stored in a fixed 31-byte
* field that is padded with zeroes, so embedded nulls are impossible.)
*
* The original unmodified filename is availale through GetRawFileName,
* The original unmodified filename is available through GetRawFileName,
* which can be optionally passed a size_t pointer to get the size
* of the raw file name, which is helpful for getting a HFS filename with
* embedded nulls.
* of the raw file name, in case it has embedded nulls.
*
* We do guarantee that the contents of subdirectories are grouped
* together. This makes it much easier to construct a hierarchy out of

View File

@ -630,7 +630,7 @@ private:
class WrapperFDI : public ImageWrapper {
public:
WrapperFDI(void) {}
WrapperFDI(void) : fHeaderBuf(), fImageTracks(0), fStorageName(NULL) {}
virtual ~WrapperFDI(void) {}
static DIError Test(GenericFD* pGFD, di_off_t wrappedLength);
@ -1213,10 +1213,21 @@ class A2FileDOS;
*/
class DISKIMG_API DiskFSDOS33 : public DiskFS {
public:
DiskFSDOS33(void) : DiskFS() {
fVTOCLoaded = false;
fDiskIsGood = false;
}
DiskFSDOS33(void) :
DiskFS(),
fFirstCatTrack(0),
fFirstCatSector(0),
fVTOCVolumeNumber(0),
fVTOCNumTracks(0),
fVTOCNumSectors(0),
fDiskVolumeNum(0),
fDiskVolumeName(),
fDiskVolumeID(),
fVTOC(),
fVTOCLoaded(false),
fCatalogSectors(),
fDiskIsGood(false)
{}
virtual ~DiskFSDOS33(void) {}
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
@ -1259,7 +1270,7 @@ public:
// utility function
static void LowerASCII(uint8_t* buf, long len);
static void ReplaceFssep(char* str, char replacement);
//static void ReplaceFssep(char* str, char replacement);
enum {
kMinTracks = 17, // need to put the catalog track here
@ -1360,12 +1371,17 @@ private:
*/
class DISKIMG_API A2FDDOS : public A2FileDescr {
public:
A2FDDOS(A2File* pFile) : A2FileDescr(pFile) {
fTSList = NULL;
fIndexList = NULL;
fOffset = 0;
fModified = false;
}
A2FDDOS(A2File* pFile) :
A2FileDescr(pFile),
fTSList(NULL),
fTSCount(0),
fIndexList(NULL),
fIndexCount(0),
fOffset(0),
fOpenEOF(0),
fOpenSectorsUsed(0),
fModified(false)
{}
virtual ~A2FDDOS(void) {
delete[] fTSList;
delete[] fIndexList;
@ -1538,7 +1554,18 @@ class A2FileProDOS;
*/
class DISKIMG_API DiskFSProDOS : public DiskFS {
public:
DiskFSProDOS(void) : fBitMapPointer(0), fTotalBlocks(0), fBlockUseMap(NULL)
DiskFSProDOS(void) :
fVolumeName(),
fVolumeID(),
fAccess(0),
fCreateWhen(0),
fModWhen(0),
fBitMapPointer(0),
fTotalBlocks(0),
fVolDirFileCount(0),
fBlockUseMap(NULL),
fDiskIsGood(false),
fEarlyDamage(false)
{}
virtual ~DiskFSProDOS(void) {
if (fBlockUseMap != NULL) {
@ -1700,8 +1727,16 @@ private:
*/
class DISKIMG_API A2FDProDOS : public A2FileDescr {
public:
A2FDProDOS(A2File* pFile) : A2FileDescr(pFile), fModified(false),
fBlockList(NULL), fOffset(0)
A2FDProDOS(A2File* pFile) :
A2FileDescr(pFile),
fModified(false),
fBlockCount(0),
fBlockList(NULL),
fOpenEOF(0),
fOpenBlocksUsed(0),
fOpenStorageType(0),
fOpenRsrcFork(false),
fOffset(0)
{}
virtual ~A2FDProDOS(void) {
delete[] fBlockList;
@ -1745,14 +1780,16 @@ private:
*/
class DISKIMG_API A2FileProDOS : public A2File {
public:
A2FileProDOS(DiskFS* pDiskFS) : A2File(pDiskFS) {
fPathName = NULL;
fSparseDataEof = fSparseRsrcEof = -1;
fpOpenFile = NULL;
fParentDirBlock = 0;
fParentDirIdx = -1;
fpParent = NULL;
}
A2FileProDOS(DiskFS* pDiskFS) :
A2File(pDiskFS),
fParentDirBlock(0),
fParentDirIdx(0),
fSparseDataEof(0),
fSparseRsrcEof(0),
fPathName(NULL),
fpOpenFile(NULL),
fpParent(NULL)
{}
virtual ~A2FileProDOS(void) {
delete fpOpenFile;
delete[] fPathName;
@ -1952,7 +1989,21 @@ class A2FilePascal;
class DISKIMG_API DiskFSPascal : public DiskFS {
public:
DiskFSPascal(void) : fDirectory(NULL) {}
DiskFSPascal(void) :
fStartBlock(0),
fNextBlock(0),
fVolumeName(),
fVolumeID(),
fTotalBlocks(0),
fNumFiles(0),
fAccessWhen(0),
fDateSetWhen(0),
fStuff1(0),
fStuff2(0),
fDiskIsGood(false),
fEarlyDamage(false),
fDirectory(NULL)
{}
virtual ~DiskFSPascal(void) {
if (fDirectory != NULL) {
assert(false); // unexpected
@ -2054,9 +2105,13 @@ private:
*/
class DISKIMG_API A2FDPascal : public A2FileDescr {
public:
A2FDPascal(A2File* pFile) : A2FileDescr(pFile) {
fOffset = 0;
}
A2FDPascal(A2File* pFile) :
A2FileDescr(pFile),
fOffset(0),
fOpenEOF(0),
fOpenBlocksUsed(0),
fModified(0)
{}
virtual ~A2FDPascal(void) {
/* nothing to clean up */
}
@ -2088,9 +2143,17 @@ private:
*/
class DISKIMG_API A2FilePascal : public A2File {
public:
A2FilePascal(DiskFS* pDiskFS) : A2File(pDiskFS) {
fpOpenFile = NULL;
}
A2FilePascal(DiskFS* pDiskFS) :
A2File(pDiskFS),
fStartBlock(0),
fNextBlock(0),
fFileType(A2FilePascal::FileType::kTypeUntyped),
fFileName(),
fBytesRemaining(0),
fModWhen(0),
fLength(0),
fpOpenFile(NULL)
{}
virtual ~A2FilePascal(void) {
/* this comes back and calls CloseDescr */
if (fpOpenFile != NULL)
@ -2188,7 +2251,7 @@ private:
class A2FileCPM;
class DISKIMG_API DiskFSCPM : public DiskFS {
public:
DiskFSCPM(void) : fDiskIsGood(false) {}
DiskFSCPM(void) : fDirEntry(), fDiskIsGood(false) {}
virtual ~DiskFSCPM(void) {}
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
@ -2272,10 +2335,12 @@ private:
*/
class DISKIMG_API A2FDCPM : public A2FileDescr {
public:
A2FDCPM(A2File* pFile) : A2FileDescr(pFile) {
//fOpen = false;
fBlockList = NULL;
}
A2FDCPM(A2File* pFile) :
A2FileDescr(pFile),
fOffset(0),
fBlockCount(0),
fBlockList(NULL)
{}
virtual ~A2FDCPM(void) {
delete fBlockList;
fBlockList = NULL;
@ -2311,7 +2376,13 @@ public:
typedef DiskFSCPM::DirEntry DirEntry;
A2FileCPM(DiskFS* pDiskFS, DirEntry* pDirEntry) :
A2File(pDiskFS), fpDirEntry(pDirEntry)
A2File(pDiskFS),
fFileName(),
fReadOnly(false),
fLength(0),
fDirIdx(0),
fpDirEntry(pDirEntry),
fpOpenFile(NULL)
{
fDirIdx = -1;
fpOpenFile = NULL;
@ -2392,7 +2463,7 @@ private:
class A2FileRDOS;
class DISKIMG_API DiskFSRDOS : public DiskFS {
public:
DiskFSRDOS(void) {}
DiskFSRDOS(void) : fVolumeName(), fOurSectPerTrack(0) {}
virtual ~DiskFSRDOS(void) {}
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
@ -2471,10 +2542,17 @@ private:
*/
class DISKIMG_API A2FileRDOS : public A2File {
public:
A2FileRDOS(DiskFS* pDiskFS) : A2File(pDiskFS) {
//fOpen = false;
fpOpenFile = NULL;
}
A2FileRDOS(DiskFS* pDiskFS) :
A2File(pDiskFS),
fFileName(),
fRawFileName(),
fFileType(A2FileRDOS::FileType::kTypeUnknown),
fNumSectors(0),
fLoadAddr(0),
fLength(0),
fStartSector(0),
fpOpenFile(NULL)
{}
virtual ~A2FileRDOS(void) {
delete fpOpenFile;
}
@ -2547,9 +2625,19 @@ private:
class A2FileHFS;
class DISKIMG_API DiskFSHFS : public DiskFS {
public:
DiskFSHFS(void) {
fLocalTimeOffset = -1;
fDiskIsGood = true;
DiskFSHFS(void) :
fVolumeName(),
fVolumeID(),
fTotalBlocks(0),
fAllocationBlockSize(0),
fNumAllocationBlocks(0),
fCreatedDateTime(0),
fModifiedDateTime(0),
fNumFiles(0),
fNumDirectories(0),
fLocalTimeOffset(-1),
fDiskIsGood(true)
{
#ifndef EXCISE_GPL_CODE
fHfsVol = NULL;
#endif
@ -2722,12 +2810,25 @@ private:
*/
class DISKIMG_API A2FileHFS : public A2File {
public:
A2FileHFS(DiskFS* pDiskFS) : A2File(pDiskFS) {
fPathName = NULL;
fpOpenFile = NULL;
A2FileHFS(DiskFS* pDiskFS) :
A2File(pDiskFS),
fIsDir(false),
fIsVolumeDir(false),
fType(0),
fCreator(0),
fFileName(),
fPathName(NULL),
fDataLength(0),
fRsrcLength(0),
fCreateWhen(0),
fModWhen(0),
fAccess(0),
fpOpenFile(NULL)
{
#ifdef EXCISE_GPL_CODE
fFakeFileBuf = NULL;
#else
fpParent = NULL;
//fOrigPathName = NULL;
#endif
}
@ -2833,10 +2934,19 @@ class A2FileGutenberg;
*/
class DISKIMG_API DiskFSGutenberg : public DiskFS {
public:
DiskFSGutenberg(void) : DiskFS() {
fVTOCLoaded = false;
fDiskIsGood = false;
}
DiskFSGutenberg(void) : DiskFS(),
fFirstCatTrack(0),
fFirstCatSector(0),
fVTOCVolumeNumber(0),
fVTOCNumTracks(0),
fVTOCNumSectors(0),
fDiskVolumeName(),
fDiskVolumeID(),
fVTOC(),
fVTOCLoaded(false),
fCatalogSectors(),
fDiskIsGood(false)
{}
virtual ~DiskFSGutenberg(void) {}
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
@ -2857,12 +2967,12 @@ public:
virtual DIError GetFreeSpaceCount(long* pTotalUnits, long* pFreeUnits,
int* pUnitSize) const override;
static bool IsValidFileName(const char* name);
static bool IsValidVolumeName(const char* name);
//static bool IsValidFileName(const char* name);
//static bool IsValidVolumeName(const char* name);
// utility function
static void LowerASCII(uint8_t* buf, long len);
static void ReplaceFssep(char* str, char replacement);
//static void ReplaceFssep(char* str, char replacement);
enum {
kMinTracks = 17, // need to put the catalog track here
@ -2880,43 +2990,13 @@ public:
private:
DIError Initialize(InitMode initMode);
DIError ReadVTOC(void);
void UpdateVolumeNum(void);
void DumpVTOC(void);
void SetSectorUsage(long track, long sector,
VolumeUsage::ChunkPurpose purpose);
void FixVolumeUsageMap(void);
DIError ReadCatalog(void);
DIError ProcessCatalogSector(int catTrack, int catSect,
const uint8_t* sctBuf);
DIError GetFileLengths(void);
DIError ComputeLength(A2FileGutenberg* pFile, const TrackSector* tsList,
int tsCount);
DIError TrimLastSectorUp(A2FileGutenberg* pFile, TrackSector lastTS);
void MarkFileUsage(A2FileGutenberg* pFile, TrackSector* tsList, int tsCount,
TrackSector* indexList, int indexCount);
DIError MakeFileNameUnique(char* fileName);
DIError GetFreeCatalogEntry(TrackSector* pCatSect, int* pCatEntry,
uint8_t* sctBuf, A2FileGutenberg** ppPrevEntry);
void CreateDirEntry(uint8_t* sctBuf, int catEntry,
const char* fileName, TrackSector* pTSSect, uint8_t fileType,
int access);
void FreeTrackSectors(TrackSector* pList, int count);
bool CheckDiskIsGood(void);
DIError WriteDOSTracks(int sectPerTrack);
DIError ScanVolBitmap(void);
DIError LoadVolBitmap(void);
DIError SaveVolBitmap(void);
void FreeVolBitmap(void);
DIError AllocSector(TrackSector* pTS);
DIError CreateEmptyBlockMap(bool withDOS);
bool GetSectorUseEntry(long track, int sector) const;
void SetSectorUseEntry(long track, int sector, bool inUse);
inline uint32_t GetVTOCEntry(const uint8_t* pVTOC, long track) const;
// Largest interesting volume is 400K (50 tracks, 32 sectors), but
// we may be looking at it in 16-sector mode, so max tracks is 100.
enum {
@ -2955,12 +3035,15 @@ private:
*/
class DISKIMG_API A2FDGutenberg : public A2FileDescr {
public:
A2FDGutenberg(A2File* pFile) : A2FileDescr(pFile) {
fOffset = 0;
fModified = false;
}
virtual ~A2FDGutenberg(void) {
}
A2FDGutenberg(A2File* pFile) :
A2FileDescr(pFile),
fTSCount(0),
fOffset(0),
fOpenEOF(0),
fOpenSectorsUsed(0),
fModified(false)
{}
virtual ~A2FDGutenberg(void) {}
friend class A2FileGutenberg;
@ -3060,15 +3143,10 @@ public:
void FixFilename(void);
static FileType ConvertFileType(long prodosType, di_off_t fileLen);
static bool IsValidType(long prodosType);
static void MakeDOSName(char* buf, const char* name);
static void TrimTrailingSpaces(char* filename);
private:
DIError ExtractTSPairs(const uint8_t* sctBuf, TrackSector* tsList,
int* pLastNonZero);
A2FDGutenberg* fpOpenFile;
};
@ -3088,7 +3166,11 @@ private:
class A2FileFAT;
class DISKIMG_API DiskFSFAT : public DiskFS {
public:
DiskFSFAT(void) {}
DiskFSFAT(void) :
fVolumeName(),
fVolumeID(),
fTotalBlocks(0)
{}
virtual ~DiskFSFAT(void) {}
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
@ -3173,11 +3255,13 @@ private:
*/
class DISKIMG_API A2FileFAT : public A2File {
public:
A2FileFAT(DiskFS* pDiskFS) : A2File(pDiskFS) {
fFakeFileBuf = NULL;
//fFakeFileLen = -1;
fpOpenFile = NULL;
}
A2FileFAT(DiskFS* pDiskFS) :
A2File(pDiskFS),
fFileName(),
fLength(0),
fFakeFileBuf(NULL),
fpOpenFile(NULL)
{}
virtual ~A2FileFAT(void) {
delete fpOpenFile;
delete[] fFakeFileBuf;

View File

@ -337,6 +337,7 @@ void DiskFSFAT::CreateFakeFile(void)
fVolumeName,
capacity,
(double) capacity / 2048.0);
buf[sizeof(buf) - 1] = '\0';
pFile = new A2FileFAT(this);
pFile->SetFakeFile(buf, strlen(buf));

View File

@ -175,7 +175,11 @@ private:
#ifdef _WIN32
class GFDWinVolume : public GenericFD {
public:
GFDWinVolume(void) : fPathName(NULL), fCurrentOffset(0), fVolumeEOF(-1)
GFDWinVolume(void) :
fPathName(NULL),
fCurrentOffset(0),
fVolumeEOF(-1),
fBlockSize(0)
{}
virtual ~GFDWinVolume(void) { delete[] fPathName; }
@ -203,7 +207,14 @@ private:
class GFDBuffer : public GenericFD {
public:
GFDBuffer(void) : fBuffer(NULL) {}
GFDBuffer(void) :
fBuffer(NULL),
fLength(0),
fAllocLength(0),
fDoDelete(false),
fDoExpand(false),
fCurrentOffset(0)
{}
virtual ~GFDBuffer(void) { Close(); }
// If "doDelete" is set, the buffer will be freed with delete[] when

View File

@ -30,7 +30,27 @@ namespace DiskImgLib {
*/
class DISKIMG_API TwoImgHeader {
public:
TwoImgHeader(void) : fDOSVolumeNum(-1), fComment(NULL), fCreatorChunk(NULL)
TwoImgHeader(void) :
fMagic(0),
fCreator(0),
fHeaderLen(0),
fVersion(0),
fImageFormat(0),
fFlags(0),
fNumBlocks(0),
fDataOffset(0),
fDataLen(0),
fCmtOffset(0),
fCmtLen(0),
fCreatorOffset(0),
fCreatorLen(0),
fSpare(),
fDOSVolumeNum(-1),
fMagicStr(),
fCreatorStr(),
fComment(NULL),
fCreatorChunk(NULL)
{}
virtual ~TwoImgHeader(void) {
delete[] fComment;

View File

@ -20,7 +20,7 @@
*/
class ReformatAsm : public ReformatText {
public:
ReformatAsm(void) {}
ReformatAsm(void) : fOutBuf(), fOutBufIndex(0) {}
virtual ~ReformatAsm(void) {}
void OutputStart(void) {
@ -129,7 +129,7 @@ private:
*/
class ReformatLISA3 : public ReformatAsm {
public:
ReformatLISA3(void) : fSymTab(NULL) {}
ReformatLISA3(void) : fSymTab(NULL), fSymCount(0) {}
virtual ~ReformatLISA3(void) {}
virtual void Examine(ReformatHolder* pHolder) override;
@ -197,7 +197,14 @@ private:
*/
class ReformatLISA4 : public ReformatAsm {
public:
ReformatLISA4(void) : fSymTab(NULL) {}
ReformatLISA4(void) :
fSymTab(NULL),
fSymCount(0),
fOpTab(0),
fAdTab(0),
fComTab(0),
fCpuType(0)
{}
virtual ~ReformatLISA4(void) { delete[] fSymTab; }
virtual void Examine(ReformatHolder* pHolder) override;

View File

@ -362,7 +362,7 @@ void CreateSimpleFont(CFont* pFont, CWnd* pWnd, const WCHAR* typeFace,
void GetWin32ErrorString(DWORD err, CString* pStr)
{
DWORD count;
LPVOID lpMsgBuf;
LPVOID lpMsgBuf = NULL;
count = FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
@ -486,6 +486,7 @@ void LogHexDump(const void* vbuf, long len)
cp = outBuf + strlen(outBuf);
}
ASSERT(cp != NULL);
sprintf(cp, "%02x ", *buf++);
cp += 3;
}