[Libreoffice-commits] core.git: 4 commits - hwpfilter/source svl/source vcl/generic vcl/source

Stephan Bergmann sbergman at redhat.com
Thu Jun 20 08:33:21 PDT 2013


 hwpfilter/source/datecode.h              |    2 +-
 hwpfilter/source/grammar.cxx             |   20 ++++++++++----------
 hwpfilter/source/hpara.cxx               |    2 +-
 hwpfilter/source/hutil.cxx               |    2 +-
 hwpfilter/source/hwpeq.cxx               |    2 +-
 hwpfilter/source/lexer.cxx               |   30 +++++++++++++++---------------
 svl/source/items/itemset.cxx             |    2 +-
 svl/source/misc/inethist.cxx             |    6 +++---
 svl/source/numbers/zforfind.cxx          |    4 ++--
 svl/source/numbers/zformat.cxx           |   22 +++++++++++-----------
 vcl/generic/fontmanager/parseAFM.cxx     |   26 +++++++++++++-------------
 vcl/source/filter/jpeg/JpegTransform.hxx |    2 +-
 vcl/source/filter/wmf/wmfwr.cxx          |    2 +-
 vcl/source/gdi/bitmap4.cxx               |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx        |    8 ++++----
 15 files changed, 66 insertions(+), 66 deletions(-)

New commits:
commit e7b87d69be29dfe9d7c879935a26171beba29cb5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 20 17:32:31 2013 +0200

    -Werror,-Wdeprecated-register
    
    Change-Id: I8edac5a93f9471c6f245bd484e845985c11027dd

diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index af26388..ba7c712 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -486,9 +486,9 @@ __yy_memcpy (to, from, count)
      char *from;
      unsigned int count;
 {
-  register char *f = from;
-  register char *t = to;
-  register int i = count;
+  char *f = from;
+  char *t = to;
+  int i = count;
 
   while (i-- > 0)
     *t++ = *f++;
@@ -501,9 +501,9 @@ __yy_memcpy (to, from, count)
 static void
 __yy_memcpy (char *to, char *from, unsigned int count)
 {
-  register char *t = to;
-  register char *f = from;
-  register int i = count;
+  char *t = to;
+  char *f = from;
+  int i = count;
 
   while (i-- > 0)
     *t++ = *f++;
@@ -544,10 +544,10 @@ int
 yyparse(YYPARSE_PARAM_ARG)
      YYPARSE_PARAM_DECL
 {
-  register int yystate;
-  register int yyn;
-  register short *yyssp;
-  register YYSTYPE *yyvsp;
+  int yystate;
+  int yyn;
+  short *yyssp;
+  YYSTYPE *yyvsp;
   int yyerrstatus;  /*  number of tokens to shift before error messages enabled */
   int yychar1 = 0;      /*  lookahead token as an internal (translated) token number */
 
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index b1d6f54..f1b374e 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -86,7 +86,7 @@ HWPPara::~HWPPara(void)
 int HWPPara::Read(HWPFile & hwpf, unsigned char flag)
 {
     unsigned char same_cshape;
-    register int ii;
+    int ii;
     scflag = flag;
 // Paragraph Information
     hwpf.Read1b(&reuse_shape, 1);
diff --git a/hwpfilter/source/hutil.cxx b/hwpfilter/source/hutil.cxx
index 5ec61a8..3f64701 100644
--- a/hwpfilter/source/hutil.cxx
+++ b/hwpfilter/source/hutil.cxx
@@ -83,7 +83,7 @@ void str2hstr(const char *c, hchar * i)
 
 int hstrlen(const hchar * s)
 {
-    register int n = 0;
+    int n = 0;
 
     while (*s++)
         n++;
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 89bbcad..4dd732c 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -466,7 +466,7 @@ void push_token(MzString &white, MzString &token, istream *strm)
    alphabet string, sigle character */
 static int next_token(MzString &white, MzString &token, istream *strm)
 {
-  register int  ch = 0;
+  int  ch = 0;
 
   if( stk->state(strm) ) {
     white = stk->white;
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 3b08915..9413c73 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -1116,9 +1116,9 @@ YY_MALLOC_DECL
 
 YY_DECL
     {
-    register yy_state_type yy_current_state;
-    register char *yy_cp, *yy_bp;
-    register int yy_act;
+    yy_state_type yy_current_state;
+    char *yy_cp, *yy_bp;
+    int yy_act;
 
     if ( yy_init )
         {
@@ -1160,7 +1160,7 @@ YY_DECL
 yy_match:
         do
             {
-            register YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(yy_ec[YY_SC_TO_UI(*yy_cp)]);
+            YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(yy_ec[YY_SC_TO_UI(*yy_cp)]);
             if ( yy_accept[yy_current_state] )
                 {
                 yy_last_accepting_state = yy_current_state;
@@ -1525,9 +1525,9 @@ case YY_STATE_EOF(INITIAL):
 
 static int yy_get_next_buffer()
     {
-    register char *dest = yy_current_buffer->yy_ch_buf;
-    register char *source = yytext_ptr;
-    register int number_to_move, i;
+    char *dest = yy_current_buffer->yy_ch_buf;
+    char *source = yytext_ptr;
+    int number_to_move, i;
     int ret_val;
 
     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@@ -1657,14 +1657,14 @@ static int yy_get_next_buffer()
 
 static yy_state_type yy_get_previous_state()
     {
-    register yy_state_type yy_current_state;
-    register char *yy_cp;
+    yy_state_type yy_current_state;
+    char *yy_cp;
 
     yy_current_state = yy_start;
 
     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
         {
-        register YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+        YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
         if ( yy_accept[yy_current_state] )
             {
             yy_last_accepting_state = yy_current_state;
@@ -1696,10 +1696,10 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
 yy_state_type yy_current_state;
 #endif
     {
-    register int yy_is_jam;
-    register char *yy_cp = yy_c_buf_p;
+    int yy_is_jam;
+    char *yy_cp = yy_c_buf_p;
 
-    register YY_CHAR yy_c = 1;
+    YY_CHAR yy_c = 1;
     if ( yy_accept[yy_current_state] )
         {
         yy_last_accepting_state = yy_current_state;
@@ -2064,7 +2064,7 @@ yyconst char *s2;
 int n;
 #endif
     {
-    register int i;
+    int i;
     for ( i = 0; i < n; ++i )
         s1[i] = s2[i];
     }
@@ -2078,7 +2078,7 @@ static int yy_flex_strlen( s )
 yyconst char *s;
 #endif
     {
-    register int n;
+    int n;
     for ( n = 0; s[n]; ++n )
         ;
 
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index de2e1ae..3f6da5d 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1376,7 +1376,7 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, sal_Bool bIgnoreDefaults )
     else
     {
         SfxWhichIter aIter( rSet );
-        register sal_uInt16 nWhich;
+        sal_uInt16 nWhich;
         while( 0 != ( nWhich = aIter.NextWhich() ) )
         {
             const SfxPoolItem* pItem = 0;
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 7eb8c6e..7dda81a 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -169,8 +169,8 @@ class INetURLHistory_Impl
     */
     void backlink (sal_uInt16 nThis, sal_uInt16 nTail)
     {
-        register lru_entry &rThis = m_pList[nThis];
-        register lru_entry &rTail = m_pList[nTail];
+        lru_entry &rThis = m_pList[nThis];
+        lru_entry &rTail = m_pList[nTail];
 
         rTail.m_nNext = nThis;
         rTail.m_nPrev = rThis.m_nPrev;
@@ -182,7 +182,7 @@ class INetURLHistory_Impl
     */
     void unlink (sal_uInt16 nThis)
     {
-        register lru_entry &rThis = m_pList[nThis];
+        lru_entry &rThis = m_pList[nThis];
 
         m_pList[rThis.m_nPrev].m_nNext = rThis.m_nNext;
         m_pList[rThis.m_nNext].m_nPrev = rThis.m_nPrev;
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 5fbb9c6..381a260 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -307,7 +307,7 @@ bool ImpSvNumberInputScan::SkipThousands( const sal_Unicode*& pStr,
     OUStringBuffer sBuff(rSymbol);
     sal_Unicode cToken;
     const OUString& rThSep = pFormatter->GetNumThousandSep();
-    register const sal_Unicode* pHere = pStr;
+    const sal_Unicode* pHere = pStr;
     ScanState eState = SsStart;
     sal_Int32 nCounter = 0; // counts 3 digits
 
@@ -458,7 +458,7 @@ inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString,
 {
     if ( nPos < rString.getLength() )
     {
-        register const sal_Unicode* p = rString.getStr() + nPos;
+        const sal_Unicode* p = rString.getStr() + nPos;
         while ( *p == ' ' )
         {
             nPos++;
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 7b6e0c7..4ffa3ce 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4297,7 +4297,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
         sal_Int32 nPoint = sStr.indexOf((sal_Unicode)'.' );
         if ( nPoint >= 0)
         {
-            register const sal_Unicode* p = sStr.getStr() + nPoint;
+            const sal_Unicode* p = sStr.getStr() + nPoint;
             while ( *++p == '0' )
                 ;
             if ( !*p )
@@ -4353,7 +4353,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
             {
                 const OUString& rStr = rInfo.sStrArray[j];
                 const sal_Unicode* p1 = rStr.getStr();
-                register const sal_Unicode* p = p1 + rStr.getLength();
+                const sal_Unicode* p = p1 + rStr.getLength();
                 while ( p1 < p-- )
                 {
                     const sal_Unicode c = *p;
@@ -4539,7 +4539,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff,  // numb
         {
             const OUString& rStr = rInfo.sStrArray[j];
             const sal_Unicode* p1 = rStr.getStr();
-            register const sal_Unicode* p = p1 + rStr.getLength();
+            const sal_Unicode* p = p1 + rStr.getLength();
             while ( p1 < p-- )
             {
                 nDigitCount++;
@@ -4670,7 +4670,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string
         {
             const OUString& rStr = rInfo.sStrArray[j];
             const sal_Unicode* p1 = rStr.getStr();
-            register const sal_Unicode* p = p1 + rStr.getLength();
+            const sal_Unicode* p = p1 + rStr.getLength();
             while ( p1 < p-- )
             {
                 if (k > 0)
@@ -5360,7 +5360,7 @@ bool SvNumberformat::HasStringNegativeSign( const OUString& rStr )
     }
     const sal_Unicode* const pBeg = rStr.getStr();
     const sal_Unicode* const pEnd = pBeg + nLen;
-    register const sal_Unicode* p = pBeg;
+    const sal_Unicode* p = pBeg;
     do
     {   // Start
         if ( *p == (sal_Unicode)'-' )
@@ -5392,9 +5392,9 @@ bool SvNumberformat::IsInQuote( const OUString& rStr, sal_Int32 nPos,
     {
         return false;
     }
-    register const sal_Unicode* p0 = rStr.getStr();
-    register const sal_Unicode* p = p0;
-    register const sal_Unicode* p1 = p0 + nPos;
+    const sal_Unicode* p0 = rStr.getStr();
+    const sal_Unicode* p = p0;
+    const sal_Unicode* p1 = p0 + nPos;
     bool bQuoted = false;
     while ( p <= p1 )
     {
@@ -5442,9 +5442,9 @@ sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos,
         }
         return -1;
     }
-    register const sal_Unicode* p0 = rStr.getStr();
-    register const sal_Unicode* p = p0 + nPos;
-    register const sal_Unicode* p1 = p0 + nLen;
+    const sal_Unicode* p0 = rStr.getStr();
+    const sal_Unicode* p = p0 + nPos;
+    const sal_Unicode* p1 = p0 + nLen;
     while ( p < p1 )
     {
         if ( *p == cQuote && p > p0 && *(p-1) != cEscIn )
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index c3cb145..af444db 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -331,7 +331,7 @@ static char *linetoken( FileInputStream* stream )
  */
 #include "afm_hash.hpp"
 
-static inline enum parseKey recognize( register char* ident, int len)
+static inline enum parseKey recognize( char* ident, int len)
 {
     const hash_entry* pEntry = AfmKeywordHash::in_word_set( ident, len );
     return pEntry ? pEntry->eKey : NOPE;
@@ -360,7 +360,7 @@ static inline enum parseKey recognize( register char* ident, int len)
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
+static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
 {
     bool cont = true, save = (gfi != NULL);
     int error = ok;
@@ -565,11 +565,11 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parseCharWidths( FileInputStream* fp, register int* cwi)
+static int parseCharWidths( FileInputStream* fp, int* cwi)
 {
     bool cont = true, save = (cwi != NULL);
     int pos = 0, error = ok, tokenlen;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -718,12 +718,12 @@ enlargeCount( unsigned int n_oldcount )
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
+static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
 {
     bool cont = true, firstTime = true;
     int error = ok, count = 0, tokenlen;
-    register CharMetricInfo *temp = fi->cmi;
-    register char *keyword;
+    CharMetricInfo *temp = fi->cmi;
+    char *keyword;
 
     while (cont)
     {
@@ -877,7 +877,7 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
+static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
 {
     bool cont = true, save = (fi->tkd != NULL);
     int pos = 0, error = ok, tcount = 0, tokenlen;
@@ -985,11 +985,11 @@ static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
+static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
 {
     bool cont = true, save = (fi->pkd != NULL);
     int pos = 0, error = ok, pcount = 0, tokenlen;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -1115,11 +1115,11 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
  *  parseFile to determine if there is more file to parse.
  */
 
-static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
+static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
 {
     bool cont = true, firstTime = true, save = (fi->ccd != NULL);
     int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -1270,7 +1270,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
     int error = ok; /* used as the return code from this function */
     int tokenlen;
 
-    register char *keyword; /* used to store a token */
+    char *keyword; /* used to store a token */
 
 
     (*fi) = (FontInfo *) calloc(1, sizeof(FontInfo));
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 5defb3e..821c16b 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -22,7 +22,7 @@
 #include <vcl/bmpacc.hxx>
 #include <vcl/bitmap.hxx>
 
-#define S2(a,b)             { register long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
+#define S2(a,b)             { long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
 #define MN3(a,b,c)          S2(a,b); S2(a,c);
 #define MX3(a,b,c)          S2(b,c); S2(a,c);
 #define MNMX3(a,b,c)        MX3(a,b,c); S2(a,b);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e043ca6..9b34224 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2010,14 +2010,14 @@ inline void PDFWriterImpl::appendUnicodeTextStringEncrypt( const OUString& rInSt
         if( checkEncryptionBufferSize( nLen*2 ) )
         {
             enableStringEncryption( nInObjectNumber );
-            register sal_uInt8 *pCopy = m_pEncryptionBuffer;
+            sal_uInt8 *pCopy = m_pEncryptionBuffer;
             sal_Int32 nChars = 2;
             *pCopy++ = 0xFE;
             *pCopy++ = 0xFF;
 // we need to prepare a byte stream from the unicode string buffer
-            for( register int i = 0; i < nLen; i++ )
+            for( int i = 0; i < nLen; i++ )
             {
-                register sal_Unicode aUnChar = pStr[i];
+                sal_Unicode aUnChar = pStr[i];
                 *pCopy++ = (sal_uInt8)( aUnChar >> 8 );
                 *pCopy++ = (sal_uInt8)( aUnChar & 255 );
                 nChars += 2;
@@ -2025,7 +2025,7 @@ inline void PDFWriterImpl::appendUnicodeTextStringEncrypt( const OUString& rInSt
 //encrypt in place
             rtl_cipher_encodeARCFOUR( m_aCipher, m_pEncryptionBuffer, nChars, m_pEncryptionBuffer, nChars );
 //now append, hexadecimal (appendHex), the encrypted result
-            for(register int i = 0; i < nChars; i++)
+            for(int i = 0; i < nChars; i++)
                 appendHex( m_pEncryptionBuffer[i], rOutBuffer );
         }
     }
commit 4839695eb8e5652efe2147eb47514e99433f10b0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 20 17:20:24 2013 +0200

    error: logical not is only applied to the left hand side of this comparison
    
    [-Werror,-Wlogical-not-parentheses] from recent Clang trunk towards 3.4.  Code
    was likethat "since the beginning," but I guess the way it needs a fix it is
    rather obvious.
    
    Change-Id: I8c962ae696de5482ac4e3fff5e08df71355de4a8

diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index e980b79..7892b12 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -359,7 +359,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo&
                     nStyle = W_PS_DOT;
                 else
                 {
-                    if ( !rLineInfo.GetDotCount() == 1 )
+                    if ( rLineInfo.GetDotCount() == 1 )
                         nStyle = W_PS_DASHDOT;
                     else
                         nStyle = W_PS_DASHDOTDOT;
commit f28507a002cd8a78f5073510535a17d384cc471d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 20 17:00:57 2013 +0200

    -Werror,-Wheader-guard
    
    Change-Id: I53e35c9f8cc436f901c4ee0d066e273c191fc118

diff --git a/vcl/source/filter/jpeg/JpegTransform.hxx b/vcl/source/filter/jpeg/JpegTransform.hxx
index dc71c05..d1b84a0 100644
--- a/vcl/source/filter/jpeg/JpegTransform.hxx
+++ b/vcl/source/filter/jpeg/JpegTransform.hxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef _JPEG_TRANSFROM_HXX
+#ifndef _JPEG_TRANSFORM_HXX
 #define _JPEG_TRANSFORM_HXX
 
 #include <tools/solar.h>
commit 8114dd11d0e9040e412b823a35a8350fd3b28729
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 20 16:45:40 2013 +0200

    -Werror,-Wheader-guard
    
    Change-Id: Ie95026a7f4eff8054b919ad5f5f1eba726c85476

diff --git a/hwpfilter/source/datecode.h b/hwpfilter/source/datecode.h
index fff18a5..46de85b 100644
--- a/hwpfilter/source/datecode.h
+++ b/hwpfilter/source/datecode.h
@@ -18,7 +18,7 @@
  */
 
 #ifndef __DATECODE_H__
-#define __DATACODE_H__
+#define __DATECODE_H__
 
 static const hchar defaultform[] =
 {


More information about the Libreoffice-commits mailing list