incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1204801 - in /incubator/ooo/trunk/main/agg: inc/agg_basics.h inc/agg_clip_liang_barsky.h inc/agg_conv_curve.h inc/agg_line_aa_basics.h inc/agg_renderer_outline_aa.h source/agg_vcgen_contour.cpp source/agg_vcgen_stroke.cpp
Date Tue, 22 Nov 2011 03:50:54 GMT
Author: pfg
Date: Tue Nov 22 03:50:53 2011
New Revision: 1204801

URL: http://svn.apache.org/viewvc?rev=1204801&view=rev
Log:
agg: fix some warnings.

Modified:
    incubator/ooo/trunk/main/agg/inc/agg_basics.h
    incubator/ooo/trunk/main/agg/inc/agg_clip_liang_barsky.h
    incubator/ooo/trunk/main/agg/inc/agg_conv_curve.h
    incubator/ooo/trunk/main/agg/inc/agg_line_aa_basics.h
    incubator/ooo/trunk/main/agg/inc/agg_renderer_outline_aa.h
    incubator/ooo/trunk/main/agg/source/agg_vcgen_contour.cpp
    incubator/ooo/trunk/main/agg/source/agg_vcgen_stroke.cpp

Modified: incubator/ooo/trunk/main/agg/inc/agg_basics.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/inc/agg_basics.h?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/inc/agg_basics.h (original)
+++ incubator/ooo/trunk/main/agg/inc/agg_basics.h Tue Nov 22 03:50:53 2011
@@ -416,7 +416,7 @@ namespace agg
     inline bool is_close(unsigned c)
     {
         return (c & ~(path_flags_cw | path_flags_ccw)) ==
-               (path_cmd_end_poly | path_flags_close); 
+               ((bool)path_cmd_end_poly | (bool)path_flags_close); 
     }
 
     //------------------------------------------------------------is_next_poly

Modified: incubator/ooo/trunk/main/agg/inc/agg_clip_liang_barsky.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/inc/agg_clip_liang_barsky.h?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/inc/agg_clip_liang_barsky.h (original)
+++ incubator/ooo/trunk/main/agg/inc/agg_clip_liang_barsky.h Tue Nov 22 03:50:53 2011
@@ -80,7 +80,7 @@ namespace agg
 
     //-------------------------------------------------------clip_liang_barsky
     template<class T>
-    inline unsigned clip_liang_barsky(T x1, T y1, T x2, T y2,
+    /*inline*/ unsigned clip_liang_barsky(T x1, T y1, T x2, T y2,
                                       const rect_base<T>& clip_box,
                                       T* x, T* y)
     {

Modified: incubator/ooo/trunk/main/agg/inc/agg_conv_curve.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/inc/agg_conv_curve.h?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/inc/agg_conv_curve.h (original)
+++ incubator/ooo/trunk/main/agg/inc/agg_conv_curve.h Tue Nov 22 03:50:53 2011
@@ -154,10 +154,10 @@ namespace agg
             return path_cmd_line_to;
         }
 
-        double ct2_x;
-        double ct2_y;
-        double end_x;
-        double end_y;
+        double ct2_x = 0;
+        double ct2_y = 0;
+        double end_x = 0;
+        double end_y = 0;
 
         unsigned cmd = m_source->vertex(x, y);
         switch(cmd)

Modified: incubator/ooo/trunk/main/agg/inc/agg_line_aa_basics.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/inc/agg_line_aa_basics.h?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/inc/agg_line_aa_basics.h (original)
+++ incubator/ooo/trunk/main/agg/inc/agg_line_aa_basics.h Tue Nov 22 03:50:53 2011
@@ -44,13 +44,13 @@ namespace agg
     //------------------------------------------------------------------line_mr
     AGG_INLINE int line_mr(int x) 
     { 
-        return x >> (line_subpixel_shift - line_mr_subpixel_shift); 
+        return x >> ((int)line_subpixel_shift - (int)line_mr_subpixel_shift); 
     }
 
     //-------------------------------------------------------------------line_hr
     AGG_INLINE int line_hr(int x) 
     { 
-        return x << (line_subpixel_shift - line_mr_subpixel_shift); 
+        return x << ((int)line_subpixel_shift - (int)line_mr_subpixel_shift); 
     }
 
     //---------------------------------------------------------------line_dbl_hr

Modified: incubator/ooo/trunk/main/agg/inc/agg_renderer_outline_aa.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/inc/agg_renderer_outline_aa.h?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/inc/agg_renderer_outline_aa.h (original)
+++ incubator/ooo/trunk/main/agg/inc/agg_renderer_outline_aa.h Tue Nov 22 03:50:53 2011
@@ -1365,7 +1365,7 @@ namespace agg
         //---------------------------------------------------------------------
         void profile(const line_profile_aa& prof) { m_profile = &prof; }
         const line_profile_aa& profile() const { return *m_profile; }
-        line_profile_aa& profile() { return *m_profile; }
+        line_profile_aa& profile() { return const_cast<line_profile_aa&>(*m_profile);
}
 
         //---------------------------------------------------------------------
         int subpixel_width() const { return m_profile->subpixel_width(); }
@@ -1562,11 +1562,11 @@ namespace agg
             {
                 if(li.vertical())
                 {
-                    while(li.step_ver());
+                    while(li.step_ver()) ;
                 }
                 else
                 {
-                    while(li.step_hor());
+                    while(li.step_hor()) ;
                 }
             }
         }
@@ -1617,11 +1617,11 @@ namespace agg
             line_interpolator_aa1<self_type> li(*this, lp, sx, sy);
             if(li.vertical())
             {
-                while(li.step_ver());
+                while(li.step_ver()) ;
             }
             else
             {
-                while(li.step_hor());
+                while(li.step_hor()) ;
             }
         }
 
@@ -1685,11 +1685,11 @@ namespace agg
             line_interpolator_aa2<self_type> li(*this, lp, ex, ey);
             if(li.vertical())
             {
-                while(li.step_ver());
+                while(li.step_ver()) ;
             }
             else
             {
-                while(li.step_hor());
+                while(li.step_hor()) ;
             }
         }
 
@@ -1756,11 +1756,11 @@ namespace agg
             line_interpolator_aa3<self_type> li(*this, lp, sx, sy, ex, ey);
             if(li.vertical())
             {
-                while(li.step_ver());
+                while(li.step_ver()) ;
             }
             else
             {
-                while(li.step_hor());
+                while(li.step_hor()) ;
             }
         }
 

Modified: incubator/ooo/trunk/main/agg/source/agg_vcgen_contour.cpp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/source/agg_vcgen_contour.cpp?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/source/agg_vcgen_contour.cpp (original)
+++ incubator/ooo/trunk/main/agg/source/agg_vcgen_contour.cpp Tue Nov 22 03:50:53 2011
@@ -153,7 +153,7 @@ namespace agg
             case end_poly:
                 if(!m_closed) return path_cmd_stop;
                 m_status = stop;
-                return path_cmd_end_poly | path_flags_close | path_flags_ccw;
+                return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_ccw;
 
             case stop:
                 return path_cmd_stop;

Modified: incubator/ooo/trunk/main/agg/source/agg_vcgen_stroke.cpp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/agg/source/agg_vcgen_stroke.cpp?rev=1204801&r1=1204800&r2=1204801&view=diff
==============================================================================
--- incubator/ooo/trunk/main/agg/source/agg_vcgen_stroke.cpp (original)
+++ incubator/ooo/trunk/main/agg/source/agg_vcgen_stroke.cpp Tue Nov 22 03:50:53 2011
@@ -196,11 +196,11 @@ namespace agg
 
             case end_poly1:
                 m_status = m_prev_status;
-                return path_cmd_end_poly | path_flags_close | path_flags_ccw;
+                return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_ccw;
 
             case end_poly2:
                 m_status = m_prev_status;
-                return path_cmd_end_poly | path_flags_close | path_flags_cw;
+                return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_cw;
 
             case stop:
                 cmd = path_cmd_stop;



Mime
View raw message