File sfftobmp-codecleanup.diff of Package sfftobmp

Index: src/output.cpp
===================================================================
--- src/output.cpp.orig	2011-03-21 16:36:39.000000000 +0100
+++ src/output.cpp	2011-03-21 16:37:17.293874585 +0100
@@ -163,7 +163,7 @@ void CPBMFilter::BeginPage(sff_dword aPa
   m_pFile->Write(acBuf, strlen(acBuf));
   sprintf(acBuf, "%s", "# generated with SffToBmp\n");
   m_pFile->Write(acBuf, strlen(acBuf));
-  sprintf(acBuf, "%ld %ld\n", aWidth, aHeight);
+  sprintf(acBuf, "%u %u\n", (unsigned int)aWidth, (unsigned int)aHeight);
   m_pFile->Write(acBuf, strlen(acBuf));
 }
 
Index: src/output.h
===================================================================
--- src/output.h.orig	2011-03-21 16:37:14.482473442 +0100
+++ src/output.h	2011-03-21 16:37:17.294874728 +0100
@@ -87,9 +87,9 @@ protected:
 
 public:
   COutputFilter(const std::string& strExt, sff_word nPagecount) :
-      m_strExtension(strExt),
+      m_sink(m_abBuffer, sizeof(m_abBuffer)),
       m_nPageCount(nPagecount),
-      m_sink(m_abBuffer, sizeof(m_abBuffer))
+      m_strExtension(strExt)
        { /* nth. else */ }
 
   virtual void Init(CFile *pFile);
@@ -157,8 +157,8 @@ protected:
 public:
   CJPEGFilter(sff_word nPagecount, int nQuality = 40) :
     COutputFilter(".jpg", nPagecount),
-    m_quality(nQuality),
-    m_bytesink(m_abBuffer, sizeof(m_abBuffer))
+    m_bytesink(m_abBuffer, sizeof(m_abBuffer)),
+    m_quality(nQuality)
     { /* nth. else */ };
 
   CBitSink& GetBitSink();
@@ -185,8 +185,8 @@ protected:
 public:
   CTIFFFilter(sff_word nPagecount, sff_word nCompression, time_t nModTime) :
     COutputFilter(".tif", nPagecount),
-    m_wCompression(nCompression),
     m_tiffFile(NULL),
+    m_wCompression(nCompression),
     m_nModTime(nModTime)
     { /* nth. else */ };
 
Index: src/cmdline.cpp
===================================================================
--- src/cmdline.cpp.orig	2011-03-21 16:36:39.000000000 +0100
+++ src/cmdline.cpp	2011-03-21 16:37:17.322878722 +0100
@@ -140,7 +140,7 @@ void CCmdLineProcessor::printVersion()
 void CCmdLineProcessor::parseCmdLine()
 {
   // short options string (one colon: req arg, two colon: opt arg)
-  char *shortopts = "vhbpT::t::frdj::o:q";
+  const char * const shortopts = "vhbpT::t::frdj::o:q";
   // long options list
   struct option longopts[] =
   {
openSUSE Build Service is sponsored by