mirror of
https://github.com/fadden/ciderpress.git
synced 2024-11-29 05:49:17 +00:00
Fix Linux build
gcc is justifiably annoyed by variable initialization crossed by a goto. (issue #51)
This commit is contained in:
parent
5950cb7c74
commit
b42cc8efe9
@ -4538,6 +4538,8 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||||||
bool allocSparse = (pDiskFS->GetParameter(DiskFS::kParmProDOS_AllocSparse) != 0);
|
bool allocSparse = (pDiskFS->GetParameter(DiskFS::kParmProDOS_AllocSparse) != 0);
|
||||||
uint8_t blkBuf[kBlkSize];
|
uint8_t blkBuf[kBlkSize];
|
||||||
uint16_t keyBlock;
|
uint16_t keyBlock;
|
||||||
|
bool allZero = true;
|
||||||
|
const uint8_t* scanPtr = (const uint8_t*)buf;
|
||||||
|
|
||||||
if (len >= 0x01000000) { // 16MB
|
if (len >= 0x01000000) { // 16MB
|
||||||
assert(false);
|
assert(false);
|
||||||
@ -4578,8 +4580,6 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||||||
* where we store it as a seedling. (GS/OS seems to do this, ProDOS 8
|
* where we store it as a seedling. (GS/OS seems to do this, ProDOS 8
|
||||||
* v2.0.3 tends to allocate the first block.)
|
* v2.0.3 tends to allocate the first block.)
|
||||||
*/
|
*/
|
||||||
bool allZero = true;
|
|
||||||
const uint8_t* scanPtr = (const uint8_t*)buf;
|
|
||||||
for (unsigned int i = 0; i < len; ++i, ++scanPtr) {
|
for (unsigned int i = 0; i < len; ++i, ++scanPtr) {
|
||||||
if (*scanPtr != 0x00) {
|
if (*scanPtr != 0x00) {
|
||||||
allZero = false;
|
allZero = false;
|
||||||
|
@ -30,7 +30,7 @@ int TwoImgHeader::InitHeader(int imageFormat, uint32_t imageSize,
|
|||||||
{
|
{
|
||||||
if (imageSize == 0)
|
if (imageSize == 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (imageFormat < kImageFormatDOS || imageFormat > (int) kImageFormatNibble)
|
if (imageFormat < (int) kImageFormatDOS || imageFormat > (int) kImageFormatNibble)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (imageFormat != kImageFormatNibble &&
|
if (imageFormat != kImageFormatNibble &&
|
||||||
|
Loading…
Reference in New Issue
Block a user