From 7992afda27691dd4f2b400199e0a2eeea0cc7b63 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Tue, 6 Aug 2024 08:59:37 +0100 Subject: [PATCH] HPCC-32395 Clean up compile warnings from jhtree and roxiemem Signed-off-by: Gavin Halliday --- plugins/debugservices/debugservices.cpp | 5 -- plugins/stringlib/stringlib.cpp | 1 - plugins/timelib/timelib.cpp | 3 +- roxie/roxiemem/roxiemem.cpp | 10 +-- rtl/nbcd/nbcd.hpp | 13 ++- system/jhtree/ctfile.cpp | 14 ++-- system/jhtree/jhinplace.cpp | 104 +----------------------- system/jhtree/jhtree.cpp | 8 +- system/jhtree/keybuild.cpp | 20 +---- system/libbase58/base58.c | 11 ++- system/lzma/LzmaEnc.cpp | 3 +- system/security/zcrypt/zcrypt.cpp | 1 + tools/genht/genht.cpp | 2 - 13 files changed, 32 insertions(+), 163 deletions(-) diff --git a/plugins/debugservices/debugservices.cpp b/plugins/debugservices/debugservices.cpp index a6b72d26e03..1370e1b2f40 100644 --- a/plugins/debugservices/debugservices.cpp +++ b/plugins/debugservices/debugservices.cpp @@ -26,11 +26,6 @@ static const char * EclDefinition = " varstring GetBuildInfo() : c,pure,entrypoint='dsGetBuildInfo',initFunction='dsInitDebugServices';\n" "END;"; -static const char * compatibleVersions[] = { - "DEBUGSERVICES 1.0 [7294888b4271178e0cfda307826d4823]", - "DEBUGSERVICES 1.0.1", - NULL }; - DEBUGSERVICES_API bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb) { if (pb->size != sizeof(ECLPluginDefinitionBlock)) diff --git a/plugins/stringlib/stringlib.cpp b/plugins/stringlib/stringlib.cpp index 3bd520e61ae..6f59f58c909 100644 --- a/plugins/stringlib/stringlib.cpp +++ b/plugins/stringlib/stringlib.cpp @@ -1238,7 +1238,6 @@ STRINGLIB_API void STRINGLIB_CALL slSplitWords(bool & __isAllResult, size32_t & return; } - unsigned sizeWords=0; char * target = result; const char * end = src + lenSrc; const char * max = end - (lenSeparator - 1); diff --git a/plugins/timelib/timelib.cpp b/plugins/timelib/timelib.cpp index 3e18bd86602..75d3c4568e8 100644 --- a/plugins/timelib/timelib.cpp +++ b/plugins/timelib/timelib.cpp @@ -796,7 +796,6 @@ TIMELIB_API unsigned int TIMELIB_CALL tlAdjustCalendar(unsigned int date, short unsigned int month = (date - (year * 10000)) / 100; unsigned int day = date - (year * 10000) - (month * 100); int expectedMonthVal = month - 1; - time_t seconds; unsigned int result = 0; // Normalize the expected month value @@ -823,7 +822,7 @@ TIMELIB_API unsigned int TIMELIB_CALL tlAdjustCalendar(unsigned int date, short timeInfo.tm_mon += month_delta; timeInfo.tm_isdst = -1; - seconds = tlMKTime(&timeInfo); + tlMKTime(&timeInfo); if (timeInfo.tm_mon != expectedMonthVal) { diff --git a/roxie/roxiemem/roxiemem.cpp b/roxie/roxiemem/roxiemem.cpp index 6d0f54911af..ffddbfbd673 100644 --- a/roxie/roxiemem/roxiemem.cpp +++ b/roxie/roxiemem/roxiemem.cpp @@ -900,7 +900,6 @@ static void *suballoc_aligned(size32_t pages, bool returnNullWhenExhausted) if (matches==pages) { unsigned start = i; - heap_t startHbi = hbi; char *ret = heapBase + (i*HEAP_BITS+b-1)*HEAP_ALIGNMENT_SIZE; for (;;) { @@ -3841,7 +3840,6 @@ unsigned ChunkedHeaplet::allocateMultiChunk(unsigned max, char * * rows) unsigned alreadyIncremented = 0; do { - bool needIncrement = false; char * ret = allocateSingle(allocated, false, alreadyIncremented); if (!ret) { @@ -8183,7 +8181,6 @@ class RoxieMemTests : public CppUnit::TestFixture void testRoundup() { Owned rowManager = createRowManager(1, NULL, logctx, NULL, false); - CChunkingRowManager * managerObject = static_cast(rowManager.get()); const unsigned maxFrac = firstFractionalHeap; const void * tempRow[MAX_FRAC_ALLOCATOR]; @@ -8242,7 +8239,7 @@ class RoxieMemTests : public CppUnit::TestFixture } void * otherrow = rowManager->allocate(100, 0); savedRowHeap.setown(rowManager->createFixedRowHeap(8, ACTIVITY_FLAG_ISREGISTERED|0, RHFhasdestructor|RHFunique)); - void * leakedRow = savedRowHeap->allocate(); + [[maybe_unused]] void * leakedRow = savedRowHeap->allocate(); ReleaseRoxieRow(otherrow); rowManager.clear(); } @@ -8428,7 +8425,8 @@ class RoxieMemTests : public CppUnit::TestFixture for (unsigned pass=0; pass < 8; pass++) { - unsigned numPagesFull = rowManager->numPagesAfterCleanup(true); + //numPagesAfterCleanup() also has the side-effect of freeing up any empty pages. + [[maybe_unused]] unsigned numPagesFull = rowManager->numPagesAfterCleanup(true); unsigned numRowsLeft = 0; unsigned target=0; for (unsigned i2 = 0; i2 < numRows; i2++) @@ -8758,8 +8756,6 @@ class RoxieMemTests : public CppUnit::TestFixture void testResize() { Owned rowManager = createRowManager(0, NULL, logctx, NULL, false); - memsize_t maxMemory = heapTotalPages * HEAP_ALIGNMENT_SIZE; - memsize_t wasted = 0; std::unique_ptr pages(new void * [heapTotalPages]); //Allocate a whole set of 1 page allocations diff --git a/rtl/nbcd/nbcd.hpp b/rtl/nbcd/nbcd.hpp index 67f5ab36379..ff9458c70ae 100644 --- a/rtl/nbcd/nbcd.hpp +++ b/rtl/nbcd/nbcd.hpp @@ -132,13 +132,12 @@ class nbcd_decl Decimal Decimal & incLSD(); protected: - enum { - maxDigits=MAX_DECIMAL_DIGITS, // Total buffer size (integer+decimal) - maxPrecision=MAX_DECIMAL_PRECISION, // Size of decimal part - maxIntegerDigits=MAX_DECIMAL_LEADING, // Size of integer part - lastDigit = maxDigits-1, // Last decimal digit - zeroDigit = (maxDigits-maxIntegerDigits), // Unity digit (decimal point) - }; + constexpr static int maxDigits=MAX_DECIMAL_DIGITS; // Total buffer size (integer+decimal) + constexpr static int maxPrecision=MAX_DECIMAL_PRECISION; // Size of decimal part + constexpr static int maxIntegerDigits=MAX_DECIMAL_LEADING; // Size of integer part + constexpr static int lastDigit = maxDigits-1; // Last decimal digit + constexpr static int zeroDigit = (maxDigits-maxIntegerDigits); // Unity digit (decimal point) + byte digits[maxDigits] = { 0 } ; // stored little endian. byte msb = zeroDigit; // Most significant integer digit byte lsb = zeroDigit; // Least significant decimal digit diff --git a/system/jhtree/ctfile.cpp b/system/jhtree/ctfile.cpp index aaf5c10c6f3..bd57fef4e6e 100644 --- a/system/jhtree/ctfile.cpp +++ b/system/jhtree/ctfile.cpp @@ -121,7 +121,7 @@ extern bool isCompressedIndex(const char *filename) return false; SwapBigEndian(hdr); } - if (hdr.root && hdr.root % hdr.nodeSize == 0 && hdr.phyrec == size-1 && hdr.ktype & (HTREE_COMPRESSED_KEY|HTREE_QUICK_COMPRESSED_KEY)) + if (hdr.root && hdr.root % hdr.nodeSize == 0 && (__uint64)hdr.phyrec == size-1 && hdr.ktype & (HTREE_COMPRESSED_KEY|HTREE_QUICK_COMPRESSED_KEY)) { NodeHdr root; if (io->read(hdr.root, sizeof(root), &root) == sizeof(root)) @@ -164,7 +164,7 @@ extern jhtree_decl bool isIndexFile(IFile *file) SwapBigEndian(hdr); } - if (!hdr.root || !hdr.nodeSize || !hdr.root || size % hdr.nodeSize || hdr.phyrec != size-1 || hdr.root % hdr.nodeSize || hdr.root >= size) + if (!hdr.root || !hdr.nodeSize || !hdr.root || size % hdr.nodeSize || (__uint64)hdr.phyrec != size-1 || hdr.root % hdr.nodeSize || (__uint64)hdr.root >= size) return false; return true; // Reasonable heuristic... } @@ -330,7 +330,7 @@ bool CPOCWriteNode::add(offset_t pos, const void *data, size32_t size, unsigned zlib_deflate(thisRowBuffer, tmp.toByteArray(), tmp.length(), GZ_DEFAULT_COMPRESSION, ZlibCompressionType::ZLIB_DEFLATE); size32_t deflateLen = thisRowBuffer.length(); // This row will require keyedLen bytes for the key, deflateLen for the payload, and a short for the offset - if (hdr.keyBytes + keyedLen + deflateLen + sizeof(unsigned short) > maxBytes) + if (hdr.keyBytes + keyedLen + deflateLen + sizeof(unsigned short) > (size32_t)maxBytes) return false; payloadBuffer.append(deflateLen, thisRowBuffer.toByteArray()); offsets.append(prevLength); @@ -355,7 +355,7 @@ void CPOCWriteNode::write(IFileIOStream *out, CRC32 *crc) } memcpy(keyPtr, payloadBuffer.toByteArray(), payloadBuffer.length()); keyPtr += payloadBuffer.length(); - assert(keyPtr - nodeBuf == hdr.keyBytes + sizeof(NodeHdr)); + assert((size_t)(keyPtr - nodeBuf) == hdr.keyBytes + sizeof(NodeHdr)); SplitNodeHdr *splitHdr = (SplitNodeHdr *) (nodeBuf + sizeof(NodeHdr)); splitHdr->firstSequence = firstSequence; CWriteNode::write(out, crc); @@ -411,7 +411,6 @@ bool CLegacyWriteNode::add(offset_t pos, const void *indata, size32_t insize, un { if (0xffff == hdr.numKeys) return false; - bool lastnode = false; assertex (indata); //assertex(insize==keyLen); const void *data; @@ -558,7 +557,7 @@ void CBloomFilterWriteNode::put4(unsigned val) unsigned short written; _WINCPYREV2(&written, keyPtr); - assertex(written + sizeof(val) + sizeof(unsigned short) <= maxBytes); + assertex(written + sizeof(val) + sizeof(unsigned short) <= (size32_t)maxBytes); _WINCPYREV4(keyPtr+sizeof(unsigned short)+written, &val); written += sizeof(val); _WINCPYREV2(keyPtr, &written); @@ -570,7 +569,7 @@ void CBloomFilterWriteNode::put8(__int64 val) unsigned short written; _WINCPYREV2(&written, keyPtr); - assertex(written + sizeof(val) + sizeof(unsigned short) <= maxBytes); + assertex(written + sizeof(val) + sizeof(unsigned short) <= (size32_t)maxBytes); _WINCPYREV8(keyPtr+sizeof(unsigned short)+written, &val); written += sizeof(val); _WINCPYREV2(keyPtr, &written); @@ -1260,7 +1259,6 @@ void CJHTreeBlobNode::load(CKeyHdr *_keyHdr, const void *rawData, offset_t _fpos { CJHTreeNode::load(_keyHdr, rawData, _fpos, needCopy); const byte *data = ((const byte *) rawData) + sizeof(hdr); - char keyType = keyHdr->getKeyType(); expandedSize = keyHdr->getNodeSize(); keyBuf = expandData(data, expandedSize); } diff --git a/system/jhtree/jhinplace.cpp b/system/jhtree/jhinplace.cpp index 90ee306f372..dad79e27239 100644 --- a/system/jhtree/jhinplace.cpp +++ b/system/jhtree/jhinplace.cpp @@ -267,81 +267,6 @@ inline void skipPacked(const byte * & cur) } while (next >= 0x80); } -//----- special packed format - code is untested - -inline unsigned getLeadingMask(byte extraBytes) { return (0x100U - (1U << (8-extraBytes))); } -inline unsigned getLeadingValueMask(byte extraBytes) { return (~getLeadingMask(extraBytes)) >> 1; } - -static void serializePacked2(MemoryBuffer & out, size32_t value) -{ - //Efficiency of serialization is not the key consideration - byte mask = 0; - unsigned size = sizePacked(value); - constexpr unsigned maxBytes = 9; - byte result[maxBytes]; - - for (unsigned i=1; i < size; i++) - { - result[maxBytes - i] = value; - value >>= 8; - mask = 0x80 | (mask >> 1); - } - unsigned start = maxBytes - size; - result[start] |= mask; - out.append(size, result + start); -} - -inline unsigned numExtraBytesFromFirst1(byte first) -{ - if (first >= 0xF0) - if (first >= 0xFC) - if (first >= 0xFE) - if (first >= 0xFF) - return 8; - else - return 7; - else - return 6; - else - if (first >= 0xF8) - return 5; - else - return 4; - else - if (first >= 0xC0) - if (first >= 0xE0) - return 3; - else - return 2; - else - return (first >> 7); // (first >= 0x80) ? 1 : 0 -} - -inline unsigned numExtraBytesFromFirst2(byte first) -{ - //Surely should be faster, but seems slower on AMD. Retest in its actual context - unsigned value = first; - return countLeadingUnsetBits(~(value << 24)); -} - -inline unsigned numExtraBytesFromFirst(byte first) -{ - return numExtraBytesFromFirst1(first); -} - -inline unsigned readPacked2(const byte * & cur) -{ - byte first = *cur++; - unsigned extraBytes = numExtraBytesFromFirst(first); - unsigned value = first & getLeadingValueMask(extraBytes); - while (extraBytes--) - { - value <<= 8; - value |= *cur++; - } - return value; -} - //------------------- static unsigned bytesRequired(unsigned __int64 value) @@ -828,7 +753,6 @@ bool PartialMatch::squash() //Always squash if you have some text - avoids length calculation elsewhere size32_t startOffset = isRoot ? 0 : 1; - size32_t keyLen = builder->queryKeyLen(); if (data.length() > startOffset) { const byte * source = data.bytes(); @@ -837,7 +761,6 @@ bool PartialMatch::squash() unsigned copyOffset = startOffset; unsigned repeatCount = 0; byte prevByte = 0; - const byte * nullRow = queryNullRow(); for (unsigned offset = startOffset; offset < maxOffset; offset++) { byte nextByte = source[offset]; @@ -1550,7 +1473,6 @@ size32_t InplaceNodeSearcher::getValueAt(unsigned int searchIndex, char *key) co return 0; unsigned resultPrev = 0; - unsigned resultNext = count; const byte * finger = nodeData; unsigned offset = 0; @@ -1643,7 +1565,6 @@ size32_t InplaceNodeSearcher::getValueAt(unsigned int searchIndex, char *key) co const byte nextFinger = getOptionValue(sizeInfo, finger, option); key[offset++] = nextFinger; - resultNext = resultPrev + countNext; resultPrev = resultPrev + countPrev; const byte * offsets = counts + numOptions * bytesPerCount; @@ -2100,7 +2021,7 @@ bool CInplaceBranchWriteNode::add(offset_t pos, const void * _data, size32_t siz if (scaleFposByNodeSize && ((pos % nodeSize) != 0)) scaleFposByNodeSize = false; - if (getDataSize() > maxBytes) + if (getDataSize() > (size32_t)maxBytes) { builder.removeLast(); positions.pop(); @@ -2279,7 +2200,7 @@ bool CInplaceLeafWriteNode::add(offset_t pos, const void * _data, size32_t size, payloadLengths.append(extraSize); size32_t required = getDataSize(true); - bool hasSpace = (required <= maxBytes); + bool hasSpace = (required <= (size32_t)maxBytes); if ((keyLen != keyCompareLen) && ctx.compressionHandler) { // The following approach is used for compressing payloads: @@ -2696,30 +2617,9 @@ static int normalizeCompare(int x) class InplaceIndexTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( InplaceIndexTest ); - //CPPUNIT_TEST(testBytesFromFirstTiming); CPPUNIT_TEST(testSearching); CPPUNIT_TEST_SUITE_END(); - void testBytesFromFirstTiming() - { - for (unsigned i=0; i <= 0xff; i++) - assertex(numExtraBytesFromFirst1(i) == numExtraBytesFromFirst2(i)); - unsigned total = 0; - { - CCycleTimer timer; - for (unsigned i=0; i < 0xffffff; i++) - total += numExtraBytesFromFirst1(i); - printf("%llu\n", timer.elapsedNs()); - } - { - CCycleTimer timer; - for (unsigned i2=0; i2 < 0xffffff; i2++) - total += numExtraBytesFromFirst2(i2); - printf("%llu\n", timer.elapsedNs()); - } - printf("%u\n", total); - } - void testSearching() { const size32_t keyLen = 8; diff --git a/system/jhtree/jhtree.cpp b/system/jhtree/jhtree.cpp index 86279960c2d..02d08c917a7 100644 --- a/system/jhtree/jhtree.cpp +++ b/system/jhtree/jhtree.cpp @@ -71,7 +71,7 @@ static std::atomic keyStore(nullptr); static unsigned defaultKeyIndexLimit = 200; static CNodeCache *nodeCache = NULL; static CriticalSection *initCrit = NULL; -static __uint64 fetchThresholdCycles = 0; +static cycle_t fetchThresholdCycles = 0; bool useMemoryMappedIndexes = false; bool linuxYield = false; @@ -329,8 +329,6 @@ void SegMonitorList::append(IKeySegmentMonitor *segment) { modified = true; unsigned fieldIdx = segment->queryFieldIndex(); - unsigned offset = segment->getOffset(); - unsigned size = segment->getSize(); while (segMonitors.length() < fieldIdx) { unsigned idx = segMonitors.length(); @@ -2871,7 +2869,7 @@ class CKeyMerger : public CKeyLevelManager break; } } - if (sortFromSeg == -1) + if (sortFromSeg == (unsigned)-1) assertex(!"Attempting to sort from offset that is not on a segment boundary"); assertex(resetPending == true); } @@ -3475,7 +3473,6 @@ class IKeyManagerSlowTest : public CppUnit::TestFixture tlk1->reset(); - offset_t fpos; ASSERT(tlk1->lookup(true)); ASSERT(memcmp(tlk1->queryKeyBuffer(), "0000003010", 10)==0); ASSERT(tlk1->lookup(true)); ASSERT(memcmp(tlk1->queryKeyBuffer(), "0000005010", 10)==0); ASSERT(tlk1->lookup(true)); ASSERT(memcmp(tlk1->queryKeyBuffer(), "0000006010", 10)==0); @@ -3764,7 +3761,6 @@ class IKeyManagerSlowTest : public CppUnit::TestFixture unsigned i; for (pass = 0; pass < 2; pass++) { - offset_t fpos; tlk1->reset(); ASSERT(tlk1->lookup(true)); ASSERT(memcmp(tlk1->queryKeyBuffer(), "0000000001", 10)==0); ASSERT(tlk1->lookup(true)); ASSERT(memcmp(tlk1->queryKeyBuffer(), "0000000002", 10)==0); diff --git a/system/jhtree/keybuild.cpp b/system/jhtree/keybuild.cpp index acdb0f0aee2..23d72c18b9e 100644 --- a/system/jhtree/keybuild.cpp +++ b/system/jhtree/keybuild.cpp @@ -271,16 +271,9 @@ class CKeyBuilder : public CInterfaceOf } protected: - offset_t endLevel(bool close) + void nextLevel() { - return 0; - } - - offset_t nextLevel() - { - offset_t ret = endLevel(false); levels++; - return 0; } void writeFileHeader(bool fixHdr, CRC32 *crc) @@ -415,15 +408,8 @@ class CKeyBuilder : public CInterfaceOf if (children.ordinality() != 1) { // Note that we used to always create at least 2 levels as various places used to assume this. - offset_t offset = nextLevel(); - if (offset) - { - ForEachItemIn(idx, children) - { - CNodeInfo &info = children.item(idx); - info.pos += offset; - } - } + nextLevel(); + NodeInfoArray parentInfo; buildLevel(children, parentInfo); buildTree(parentInfo); diff --git a/system/libbase58/base58.c b/system/libbase58/base58.c index 874b92b758b..df05f75a3f8 100644 --- a/system/libbase58/base58.c +++ b/system/libbase58/base58.c @@ -87,11 +87,14 @@ bool b58tobin(void *bin, size_t *binszp, const char *b58, size_t b58sz) switch (bytesleft) { case 3: *(binu++) = (outi[0] & 0xff0000) >> 16; + [[fallthrough]]; case 2: *(binu++) = (outi[0] & 0xff00) >> 8; + [[fallthrough]]; case 1: *(binu++) = (outi[0] & 0xff); ++j; + [[fallthrough]]; default: break; } @@ -160,14 +163,14 @@ bool b58enc(char *b58, size_t *b58sz, const void *data, size_t binsz) ssize_t i, j, high, zcount = 0; size_t size; - while (zcount < binsz && !bin[zcount]) + while (zcount < (ssize_t)binsz && !bin[zcount]) ++zcount; size = (binsz - zcount) * 138 / 100 + 1; uint8_t *buf = (uint8_t*)alloca(size); memset(buf, 0, size); - for (i = zcount, high = size - 1; i < binsz; ++i, high = j) + for (i = zcount, high = size - 1; i < (ssize_t)binsz; ++i, high = j) { for (carry = bin[i], j = size - 1; (j > high) || carry; --j) { @@ -177,7 +180,7 @@ bool b58enc(char *b58, size_t *b58sz, const void *data, size_t binsz) } } - for (j = 0; j < size && !buf[j]; ++j); + for (j = 0; j < (ssize_t)size && !buf[j]; ++j); if (*b58sz <= zcount + size - j) { @@ -187,7 +190,7 @@ bool b58enc(char *b58, size_t *b58sz, const void *data, size_t binsz) if (zcount) memset(b58, '1', zcount); - for (i = zcount; j < size; ++i, ++j) + for (i = zcount; j < (ssize_t)size; ++i, ++j) b58[i] = b58digits_ordered[buf[j]]; b58[i] = '\0'; *b58sz = i + 1; diff --git a/system/lzma/LzmaEnc.cpp b/system/lzma/LzmaEnc.cpp index ab1d0cca8f9..29461d6f6dc 100644 --- a/system/lzma/LzmaEnc.cpp +++ b/system/lzma/LzmaEnc.cpp @@ -1923,11 +1923,10 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { UInt32 beforeSize = kNumOpts; - Bool btMode; if (!RangeEnc_Alloc(&p->rc, alloc)) return SZ_ERROR_MEM; - btMode = (p->matchFinderBase.btMode != 0); #ifdef COMPRESS_MF_MT + Bool btMode = (p->matchFinderBase.btMode != 0); p->mtMode = (p->multiThread && !p->fastMode && btMode); #endif diff --git a/system/security/zcrypt/zcrypt.cpp b/system/security/zcrypt/zcrypt.cpp index cc899c0b8c0..3fcb5d9a347 100644 --- a/system/security/zcrypt/zcrypt.cpp +++ b/system/security/zcrypt/zcrypt.cpp @@ -656,6 +656,7 @@ int RSAZCryptor::unzip(int in_len, unsigned char* in, ZBuffer& outbuf) { case Z_NEED_DICT: ret = Z_DATA_ERROR; /* and fall through */ + [[fallthrough]]; case Z_DATA_ERROR: case Z_MEM_ERROR: if(m_trace_level > 0) diff --git a/tools/genht/genht.cpp b/tools/genht/genht.cpp index 770bac01bc1..d35760d6640 100644 --- a/tools/genht/genht.cpp +++ b/tools/genht/genht.cpp @@ -124,7 +124,6 @@ void process(const char *fname) bool valuesshort = true; strcpy(eclmodname,"UNKNOWN"); char ln[1024]; - bool gotheader=false; unsigned count = 0; unsigned lastres = (unsigned)-1; unsigned lastpos = 0; @@ -187,7 +186,6 @@ void process(const char *fname) else if (memcmp(ln,"MAPVALUE:",9)==0) mapvalue = ln[9]=='Y'; */ - gotheader = true; } } fclose(inFile);