openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chengjh <chen...@apache.org>
Subject Re: WaE: sw/source/filter/ww8 compiler warnings
Date Fri, 30 Nov 2012 11:04:59 GMT
I will have a look.....

On Fri, Nov 30, 2012 at 3:54 AM, Pavel Janík <Pavel@janik.cz> wrote:

> Hi,
>
> current trunk issues few warnings in sw/source/filter/ww8:
>
> cc1plus: warnings being treated as errors
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/ww8par3.cxx:
> In member function ‘SwNumRule* WW8ListManager::GetNumRule(int)’:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/ww8par3.cxx:1125:
> warning: comparison between signed and unsigned integer expressions
> make: *** [/Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/350/
> unxmacxi.pro/workdir/CxxObject/sw/source/filter/ww8/ww8par3.o] Error 1
>
> cc1plus: warnings being treated as errors
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:
> In member function ‘void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong,
> sal_uLong)’:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:317:
> warning: comparison between signed and unsigned integer expressions
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:
> In member function ‘int WW8Export::CollectGrfsOfBullets() const’:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:1452:
> warning: comparison between signed and unsigned integer expressions
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:
> In member function ‘int WW8Export::GetGrfIndex(const SvxBrushItem&)’:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/filter/ww8/wrtww8.cxx:1535:
> warning: comparison between signed and unsigned integer expressions
> make: *** [/Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/350/
> unxmacxi.pro/workdir/CxxObject/sw/source/filter/ww8/wrtww8.o] Error 1
>
> The following patch "fixes" these issues, but I'd like to see author
> committing the change:
>
> ===================================================================
> --- wrtww8.cxx  (revision 1415339)
> +++ wrtww8.cxx  (working copy)
> @@ -314,7 +314,7 @@
>      {
>          if (aItr->second)
>          {
> -            if (aItr->second->first == nFrom)
> +            if (aItr->second->first == static_cast<long>(nFrom))
>              {
>                  aItr->second->second.first = true;
>                  aItr->second->first = nTo;
> @@ -1449,7 +1449,7 @@
>                                 if ( pGrf )
>                                 {
>                                         bool bHas = false;
> -                                       for (int i = 0; i <
> m_vecBulletPic.size(); ++i)
> +                                       for (unsigned int i = 0; i <
> m_vecBulletPic.size(); ++i)
>                                         {
>                                                 if
> (m_vecBulletPic[i]->GetChecksum() == pGrf->GetChecksum())
>                                                 {
> @@ -1532,7 +1532,7 @@
>         int nIndex = -1;
>         if ( rBrush.GetGraphic() )
>         {
> -               for (int i = 0; i < m_vecBulletPic.size(); ++i)
> +               for (unsigned int i = 0; i < m_vecBulletPic.size(); ++i)
>                 {
>                         if (m_vecBulletPic[i]->GetChecksum() ==
> rBrush.GetGraphic()->GetChecksum())
>                         {
> Index: ww8par3.cxx
> ===================================================================
> --- ww8par3.cxx (revision 1415339)
> +++ ww8par3.cxx (working copy)
> @@ -1122,7 +1122,7 @@
>
>  SwNumRule* WW8ListManager::GetNumRule(int i)
>  {
> -       if ( i >= 0 && i < maLSTInfos.size() )
> +       if ( i >= 0 && static_cast<sal_Size>(i) < maLSTInfos.size()
)
>                 return maLSTInfos[i]->pNumRule;
>         else
>                 return 0;
>
>
> --
> Pavel Janík
>
>
>
>


-- 

Best Regards,Jianhong Cheng

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message