1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
Description: Fix compiler warnings
Fix warnings from g++ -Wall -W
Author: Olly Betts <olly@survex.com>
Forwarded: no
Last-Update: 2019-05-20
--- sffview-0.5.0.orig/common.cpp
+++ sffview-0.5.0/common.cpp
@@ -168,7 +168,7 @@ sff_byte CFile::GetC()
void CFile::Read(void *pTarget, int nLen)
{
- size_t rc = ::fread(pTarget, 1, nLen, m_hFile);
+ ::fread(pTarget, 1, nLen, m_hFile);
}
void CFile::Write(void *pSource, int nLen)
--- sffview-0.5.0.orig/sffdoc.cpp
+++ sffview-0.5.0/sffdoc.cpp
@@ -54,8 +54,8 @@ CBitmapDecoder::CBitmapDecoder(wxUint32
m_pBitmap(0),
m_Width(aWidth),
m_Height(aHeight),
- m_Scanline(0),
- m_sink(m_abBuffer, sizeof(m_abBuffer))
+ m_sink(m_abBuffer, sizeof(m_abBuffer)),
+ m_Scanline(0)
{
m_WidthInBytes = aWidth>>3;
m_Width = aWidth;
@@ -161,7 +161,7 @@ int SffDocument::GetCurrentPageIdx()
void SffDocument::CreatePageBitmap()
{
int i;
- int lines, cols;
+ int lines;
bool bLowRes;
if (m_pSffFile == NULL)
@@ -174,7 +174,6 @@ void SffDocument::CreatePageBitmap()
m_pSffFile->SeekPage(m_nPageIdx);
bLowRes = m_pSffFile->IsLowRes(m_nPageIdx);
lines = GetHeight();
- cols = GetWidth();
// Decode SFF Records ...
m_pDecoder->Reset();
while ((lines > 0) && m_pSffFile->GetRecord(rec)) {
@@ -223,7 +222,7 @@ void SffDocument::CreatePageBitmap()
wxBitmap *SffDocument::GetPageBitmap(int nPage)
{
int i;
- int lines, cols;
+ int lines;
bool bLowRes;
@@ -239,7 +238,6 @@ wxBitmap *SffDocument::GetPageBitmap(int
m_pSffFile->SeekPage(nPage-1);
bLowRes = m_pSffFile->IsLowRes(nPage-1);
lines = GetHeight();
- cols = GetWidth();
// Decode SFF Records ...
m_pDecoder->Reset();
while ((lines > 0) && m_pSffFile->GetRecord(rec)) {
|